0cd82d7524512970d8400995429241278ddcc785
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-11  Anders Carlsson  <andersca@apple.com>
2
3         FrameFilter can just be an std::function instead
4         https://bugs.webkit.org/show_bug.cgi?id=124176
5
6         Reviewed by Tim Horton.
7
8         * WebCore.exp.in:
9         * loader/archive/cf/LegacyWebArchive.cpp:
10         (WebCore::LegacyWebArchive::create):
11         * loader/archive/cf/LegacyWebArchive.h:
12
13 2013-11-11  Simon Fraser  <simon.fraser@apple.com>
14
15         REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
16         https://bugs.webkit.org/show_bug.cgi?id=124090
17
18         Reviewed by Beth Dakin.
19         
20         After r155660 we did fewer layouts, so were left with overlay scrollbars in the
21         wrong locations because nothing would update them after RenderLayerBacking
22         computed a new offsetFromRenderer.
23         
24         First part of the fix is to wean positionOverflowControlsLayers() off of
25         an absolute offset from the root. Do this by not using Widget::frameRect()
26         to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
27         which is what we used to position the scrollbars in the first place.
28         
29         Second part of the fix is to call positionOverflowControlsLayers() from
30         RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
31         changed.
32
33         Test: compositing/overflow/overflow-scrollbar-layer-positions.html
34
35         * rendering/RenderLayer.cpp:
36         (WebCore::RenderLayer::positionOverflowControls):
37         * rendering/RenderLayerBacking.cpp:
38         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
39         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
40         * rendering/RenderLayerBacking.h:
41
42 2013-11-11  Brent Fulgham  <bfulgham@apple.com>
43
44         [Win] m_isCompositeFontReference is uninitialized.
45         https://bugs.webkit.org/show_bug.cgi?id=124170
46
47         Reviewed by Tim Horton.
48
49         Initialize value to false, as is done in the other constructors for this data type.
50
51         * platform/graphics/win/FontPlatformDataCGWin.cpp:
52         (WebCore::FontPlatformData::FontPlatformData): 
53         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
54         (WebCore::FontPlatformData::FontPlatformData):
55         * platform/graphics/win/FontPlatformDataWin.cpp:
56         (WebCore::FontPlatformData::FontPlatformData):
57
58 2013-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
59
60         [Mac] Characters too close together in complex Arabic text
61         https://bugs.webkit.org/show_bug.cgi?id=124057
62
63         Reviewed by Darin Adler.
64
65         We weren't updating our total width variable with run's initial
66         advance information, leading to widths that were too narrow.
67
68         In addition, while initial advances for runs that aren't the first
69         run are accounted for by baking in the initial advances into the
70         previous character's advance, the initial advance for the first run
71         has to be accounted for in ComplexTextController::offsetForPosition.
72
73         Test: fast/text/complex-grapheme-cluster-with-initial-advance.html
74         Test: fast/text/selection-in-initial-advance-region.html
75
76         * platform/graphics/mac/ComplexTextController.cpp:
77         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update
78         total width variable
79         (WebCore::ComplexTextController::offsetOfPosition): Account for
80         the first run's initial advance.
81
82 2013-11-11  Brady Eidson  <beidson@apple.com>
83
84         Make IDBBackingStoreTransaction be RefCounted
85         https://bugs.webkit.org/show_bug.cgi?id=124168
86
87         Reviewed by Tim Horton.
88
89         This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
90
91         * Modules/indexeddb/IDBBackingStoreInterface.h:
92         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
93         * Modules/indexeddb/IDBTransactionBackend.h:
94
95         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
96         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
97         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
98         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
99
100 2013-11-11  Antti Koivisto  <antti@apple.com>
101
102         End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases
103         https://bugs.webkit.org/show_bug.cgi?id=124158
104
105         Reviewed by Dave Hyatt.
106         
107         If a word just fits the line but the following space overflows we fail to collapse whitespaces 
108         at the end of the line. This happens because with break-word we end up taking word breaking
109         code path that does not have pre-wrap whitespace handling.
110         
111         This patch makes the behavior consistent and also matches Firefox.
112
113         Test: fast/text/break-word-pre-wrap.html
114
115         * rendering/RenderBlockLineLayout.cpp:
116         (WebCore::BreakingContext::handleText):
117         
118             Don't take the word break code path if we are pre-wrap and the current character is space.
119             Instead proceed to break the line normally as this is a valid break position.
120
121 2013-11-11  Bear Travis  <betravis@adobe.com>
122
123         Web Inspector: [CSS Shapes] Highlight shape-outside when its element is selected in the Web Inspector
124         https://bugs.webkit.org/show_bug.cgi?id=124071
125
126         Reviewed by Timothy Hatcher.
127
128         Adding code to pass computed shape information (path and bounds) to the Inspector overlay
129         canvas, and the code to display it. The code creates a path based on ShapeInfo's computed
130         shape. The shape highlight draws whenever an element is highlighted, via selection in
131         the Inspector elements view.
132
133         Test: inspector-protocol/model/highlight-shape-outside.html
134
135         * inspector/InspectorOverlay.cpp:
136         (WebCore::localPointToRoot): Convert a local point to be relative to the root view.
137         (WebCore::appendPathCommandAndPoints): Helper for building a single segment's worth
138         of the overall path.
139         (WebCore::appendPathSegment): Build a single segment's worth of the overall path.
140         (WebCore::buildObjectForShapeOutside): Build an object to pass to the Inspector overlay
141         that represents the shape.
142         (WebCore::buildObjectForElementInfo): Call buildObjectForShapeOutside and pass the
143         resulting object along.
144         * inspector/InspectorOverlayPage.js:
145         (pathCommand): Draw a single path command.
146         (drawPath): Draw the overall path.
147         (_drawShapeHighlight): Draw the highlight for the given shapeInfo.
148         (drawNodeHighlight): Call _drawShapeHighlight.
149         * rendering/shapes/PolygonShape.h:
150         (WebCore::PolygonShape::polygon): Expose the underlying vertex information for a
151         PolygonShape.
152         * rendering/shapes/RasterShape.h:
153         * rendering/shapes/RectangleShape.h:
154         (WebCore::RectangleShape::logicalRx): Expose the logical radii for a shape.
155         (WebCore::RectangleShape::logicalRy): Ditto.
156         * rendering/shapes/Shape.h:
157         * rendering/shapes/ShapeInfo.h:
158         (WebCore::ShapeInfo::computedShapePhysicalBoundingBox): The physical bounds of a
159         shape in renderer coordinates.
160         (WebCore::ShapeInfo::shapeToRendererPoint): Convert shape coordinates to renderer
161         coordinates.
162         (WebCore::ShapeInfo::shapeToRendererSize): Ditto.
163         (WebCore::ShapeInfo::ShapeInfo):
164
165 2013-11-11  Alexey Proskuryakov  <ap@apple.com>
166
167         Support WebCrypto KeyPair interface
168         https://bugs.webkit.org/show_bug.cgi?id=124161
169
170         Reviewed by Geoffrey Garen.
171
172         No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
173
174         * CMakeLists.txt:
175         * DerivedSources.make:
176         * GNUmakefile.list.am:
177         * WebCore.xcodeproj/project.pbxproj:
178         Added new files.
179
180         * bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
181
182         * bindings/js/JSCryptoKeyPairCustom.cpp: Added.
183         (WebCore::JSCryptoKeyPair::visitChildren):
184         * crypto/CryptoKey.idl:
185         CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
186         a back pointer.
187
188         * crypto/CryptoKeyPair.cpp: Added.
189         (WebCore::CryptoKeyPair::CryptoKeyPair):
190         (WebCore::CryptoKeyPair::~CryptoKeyPair):
191         * crypto/CryptoKeyPair.h: Added.
192         (WebCore::CryptoKeyPair::create):
193         (WebCore::CryptoKeyPair::publicKey):
194         (WebCore::CryptoKeyPair::privateKey):
195         * crypto/CryptoKeyPair.idl: Added.
196
197 2013-11-11  Nick Diego Yamane  <nick.yamane@openbossa.org>
198
199         Fix build after r158967
200         https://bugs.webkit.org/show_bug.cgi?id=124160
201
202         Reviewed by Anders Carlsson.
203
204         After r158967, gcc debug builds with "-Werror=type-limits" enabled
205         fail. This patch fixes it.
206
207         * rendering/shapes/RasterShape.h:
208         (WebCore::RasterShapeIntervals::intervalsAt):
209
210 2013-11-11  Zan Dobersek  <zdobersek@igalia.com>
211
212         Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces
213         https://bugs.webkit.org/show_bug.cgi?id=124151
214
215         Reviewed by Geoffrey Garen.
216
217         The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
218         non-configurability of operations on the interface that uses the attribute. Non-configurability
219         of operations is the default behavior at the moment, but will be changed to follow the WebIDL
220         specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
221         IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
222
223         The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
224         also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
225         when support for it will be added to the JSC bindings generator.
226
227         * Modules/battery/BatteryManager.idl:
228         * Modules/encryptedmedia/MediaKeySession.idl:
229         * Modules/encryptedmedia/MediaKeys.idl:
230         * Modules/gamepad/GamepadList.idl:
231         * Modules/geolocation/Geolocation.idl:
232         * Modules/indexeddb/IDBCursor.idl:
233         * Modules/indexeddb/IDBDatabase.idl:
234         * Modules/indexeddb/IDBFactory.idl:
235         * Modules/indexeddb/IDBIndex.idl:
236         * Modules/indexeddb/IDBKeyRange.idl:
237         * Modules/indexeddb/IDBObjectStore.idl:
238         * Modules/indexeddb/IDBTransaction.idl:
239         * Modules/indexeddb/IDBVersionChangeEvent.idl:
240         * Modules/mediacontrols/MediaControlsHost.idl:
241         * Modules/mediasource/MediaSource.idl:
242         * Modules/mediasource/SourceBuffer.idl:
243         * Modules/mediasource/SourceBufferList.idl:
244         * Modules/mediastream/MediaStream.idl:
245         * Modules/mediastream/MediaStreamTrack.idl:
246         * Modules/mediastream/RTCDTMFSender.idl:
247         * Modules/mediastream/RTCDataChannel.idl:
248         * Modules/mediastream/RTCPeerConnection.idl:
249         * Modules/mediastream/RTCStatsReport.idl:
250         * Modules/mediastream/RTCStatsResponse.idl:
251         * Modules/networkinfo/NetworkInfoConnection.idl:
252         * Modules/notifications/Notification.idl:
253         * Modules/notifications/NotificationCenter.idl:
254         * Modules/proximity/DeviceProximityEvent.idl:
255         * Modules/quota/StorageInfo.idl:
256         * Modules/quota/StorageQuota.idl:
257         * Modules/speech/SpeechGrammarList.idl:
258         * Modules/speech/SpeechRecognition.idl:
259         * Modules/speech/SpeechRecognitionResult.idl:
260         * Modules/speech/SpeechRecognitionResultList.idl:
261         * Modules/speech/SpeechSynthesis.idl:
262         * Modules/webaudio/AnalyserNode.idl:
263         * Modules/webaudio/AudioBuffer.idl:
264         * Modules/webaudio/AudioBufferSourceNode.idl:
265         * Modules/webaudio/AudioContext.idl:
266         * Modules/webaudio/AudioListener.idl:
267         * Modules/webaudio/AudioNode.idl:
268         * Modules/webaudio/AudioParam.idl:
269         * Modules/webaudio/BiquadFilterNode.idl:
270         * Modules/webaudio/OscillatorNode.idl:
271         * Modules/webaudio/PannerNode.idl:
272         * Modules/webdatabase/Database.idl:
273         * Modules/webdatabase/DatabaseSync.idl:
274         * Modules/webdatabase/SQLResultSetRowList.idl:
275         * Modules/webdatabase/SQLTransaction.idl:
276         * Modules/webdatabase/SQLTransactionSync.idl:
277         * Modules/websockets/WebSocket.idl:
278         * crypto/CryptoKey.idl:
279         * crypto/SubtleCrypto.idl:
280         * css/CSSHostRule.idl:
281         * css/CSSMediaRule.idl:
282         * css/CSSPrimitiveValue.idl:
283         * css/CSSRuleList.idl:
284         * css/CSSStyleDeclaration.idl:
285         * css/CSSStyleSheet.idl:
286         * css/CSSSupportsRule.idl:
287         * css/CSSValueList.idl:
288         * css/DOMWindowCSS.idl:
289         * css/FontLoader.idl:
290         * css/MediaList.idl:
291         * css/MediaQueryList.idl:
292         * css/MediaQueryListListener.idl:
293         * css/StyleMedia.idl:
294         * css/StyleSheet.idl:
295         * css/StyleSheetList.idl:
296         * css/WebKitCSSFilterValue.idl:
297         * css/WebKitCSSKeyframesRule.idl:
298         * css/WebKitCSSMatrix.idl:
299         * css/WebKitCSSTransformValue.idl:
300         * dom/CharacterData.idl:
301         * dom/ChildNode.idl:
302         * dom/ClientRectList.idl:
303         * dom/Clipboard.idl:
304         * dom/CompositionEvent.idl:
305         * dom/CustomEvent.idl:
306         * dom/DOMCoreException.idl:
307         * dom/DOMImplementation.idl:
308         * dom/DOMNamedFlowCollection.idl:
309         * dom/DOMStringList.idl:
310         * dom/DOMStringMap.idl:
311         * dom/DataTransferItem.idl:
312         * dom/DataTransferItemList.idl:
313         * dom/DeviceMotionEvent.idl:
314         * dom/DeviceOrientationEvent.idl:
315         * dom/Document.idl:
316         * dom/DocumentFragment.idl:
317         * dom/DocumentType.idl:
318         * dom/Element.idl:
319         * dom/Event.idl:
320         * dom/EventException.idl:
321         * dom/EventListener.idl:
322         * dom/EventTarget.idl:
323         * dom/HashChangeEvent.idl:
324         * dom/KeyboardEvent.idl:
325         * dom/MessageEvent.idl:
326         * dom/MessagePort.idl:
327         * dom/MouseEvent.idl:
328         * dom/MutationEvent.idl:
329         * dom/MutationObserver.idl:
330         * dom/NamedNodeMap.idl:
331         * dom/Node.idl:
332         * dom/NodeFilter.idl:
333         * dom/NodeIterator.idl:
334         * dom/NodeList.idl:
335         * dom/Range.idl:
336         * dom/RangeException.idl:
337         * dom/ShadowRoot.idl:
338         * dom/Text.idl:
339         * dom/TextEvent.idl:
340         * dom/TouchEvent.idl:
341         * dom/TouchList.idl:
342         * dom/TreeWalker.idl:
343         * dom/UIEvent.idl:
344         * dom/WebKitNamedFlow.idl:
345         * dom/WheelEvent.idl:
346         * fileapi/Blob.idl:
347         * fileapi/FileException.idl:
348         * fileapi/FileList.idl:
349         * fileapi/FileReader.idl:
350         * fileapi/FileReaderSync.idl:
351         * html/DOMFormData.idl:
352         * html/DOMSettableTokenList.idl:
353         * html/DOMTokenList.idl:
354         * html/DOMURL.idl:
355         * html/HTMLAllCollection.idl:
356         * html/HTMLAnchorElement.idl:
357         * html/HTMLButtonElement.idl:
358         * html/HTMLCanvasElement.idl:
359         * html/HTMLCollection.idl:
360         * html/HTMLDocument.idl:
361         * html/HTMLElement.idl:
362         * html/HTMLEmbedElement.idl:
363         * html/HTMLFieldSetElement.idl:
364         * html/HTMLFormControlsCollection.idl:
365         * html/HTMLFormElement.idl:
366         * html/HTMLFrameElement.idl:
367         * html/HTMLIFrameElement.idl:
368         * html/HTMLInputElement.idl:
369         * html/HTMLKeygenElement.idl:
370         * html/HTMLMarqueeElement.idl:
371         * html/HTMLMediaElement.idl:
372         * html/HTMLObjectElement.idl:
373         * html/HTMLOptionsCollection.idl:
374         * html/HTMLOutputElement.idl:
375         * html/HTMLSelectElement.idl:
376         * html/HTMLTableElement.idl:
377         * html/HTMLTableRowElement.idl:
378         * html/HTMLTableSectionElement.idl:
379         * html/HTMLTextAreaElement.idl:
380         * html/HTMLVideoElement.idl:
381         * html/MediaController.idl:
382         * html/RadioNodeList.idl:
383         * html/TimeRanges.idl:
384         * html/canvas/CanvasGradient.idl:
385         * html/canvas/CanvasRenderingContext2D.idl:
386         * html/canvas/DOMPath.idl:
387         * html/canvas/EXTDrawBuffers.idl:
388         * html/canvas/OESVertexArrayObject.idl:
389         * html/canvas/WebGLDebugShaders.idl:
390         * html/canvas/WebGLLoseContext.idl:
391         * html/canvas/WebGLRenderingContext.idl:
392         * html/track/AudioTrackList.idl:
393         * html/track/TextTrack.idl:
394         * html/track/TextTrackCue.idl:
395         * html/track/TextTrackCueList.idl:
396         * html/track/TextTrackList.idl:
397         * html/track/TextTrackRegionList.idl:
398         * html/track/VideoTrackList.idl:
399         * loader/appcache/DOMApplicationCache.idl:
400         * page/Console.idl:
401         * page/Crypto.idl:
402         * page/DOMSecurityPolicy.idl:
403         * page/DOMSelection.idl:
404         * page/DOMWindow.idl:
405         * page/EventSource.idl:
406         * page/History.idl:
407         * page/Navigator.idl:
408         * page/Performance.idl:
409         * page/PerformanceEntryList.idl:
410         * page/SpeechInputResultList.idl:
411         * page/WindowBase64.idl:
412         * page/WindowTimers.idl:
413         * plugins/DOMMimeTypeArray.idl:
414         * plugins/DOMPlugin.idl:
415         * plugins/DOMPluginArray.idl:
416         * storage/Storage.idl:
417         * storage/StorageEvent.idl:
418         * svg/SVGAngle.idl:
419         * svg/SVGAnimationElement.idl:
420         * svg/SVGColor.idl:
421         * svg/SVGCursorElement.idl:
422         * svg/SVGDocument.idl:
423         * svg/SVGElement.idl:
424         * svg/SVGElementInstanceList.idl:
425         * svg/SVGException.idl:
426         * svg/SVGFEDropShadowElement.idl:
427         * svg/SVGFEGaussianBlurElement.idl:
428         * svg/SVGFEMorphologyElement.idl:
429         * svg/SVGFilterElement.idl:
430         * svg/SVGGraphicsElement.idl:
431         * svg/SVGLength.idl:
432         * svg/SVGLengthList.idl:
433         * svg/SVGMarkerElement.idl:
434         * svg/SVGMaskElement.idl:
435         * svg/SVGMatrix.idl:
436         * svg/SVGNumberList.idl:
437         * svg/SVGPaint.idl:
438         * svg/SVGPathElement.idl:
439         * svg/SVGPathSegList.idl:
440         * svg/SVGPatternElement.idl:
441         * svg/SVGPoint.idl:
442         * svg/SVGPointList.idl:
443         * svg/SVGSVGElement.idl:
444         * svg/SVGStringList.idl:
445         * svg/SVGTests.idl:
446         * svg/SVGTextContentElement.idl:
447         * svg/SVGTransform.idl:
448         * svg/SVGTransformList.idl:
449         * workers/DedicatedWorkerGlobalScope.idl:
450         * workers/Worker.idl:
451         * workers/WorkerGlobalScope.idl:
452         * workers/WorkerLocation.idl:
453         * xml/DOMParser.idl:
454         * xml/XMLHttpRequest.idl:
455         * xml/XMLHttpRequestException.idl:
456         * xml/XMLHttpRequestUpload.idl:
457         * xml/XMLSerializer.idl:
458         * xml/XPathEvaluator.idl:
459         * xml/XPathException.idl:
460         * xml/XPathExpression.idl:
461         * xml/XPathNSResolver.idl:
462         * xml/XPathResult.idl:
463         * xml/XSLTProcessor.idl:
464
465 2013-11-11  Javier Fernandez  <jfernandez@igalia.com>
466
467         [CSS Regions] Selection focusNode set to the "region" block, instead of the "source" block
468         https://bugs.webkit.org/show_bug.cgi?id=120769
469
470         Reviewed by David Hyatt.
471
472         When a point hits a Region block, current positionForPoint algorithm determines its
473         position in the DOM and returns either the start or end offset for such block, since
474         Region blocks have no children in the DOM.
475
476         It's necessary to map the point into Flow Thread coordinates in order to determine
477         the DOM position of the specific element rendered by the Region.
478
479         Top margin, padding and border points should be mapped to the beginning of the Region
480         block, while bottom points are mapped to the block end. The Left coordinate its just
481         adjusted to fit in the Flow Thread boundaries, since its not affected by the Flow
482         direction.
483
484         Besides, when inspecting the Flow Thread blocks looking for the last candidate box,
485         the Region originally associated to the point might be taken into account. Only the
486         blocks/boxes rendered by the Region are potential candidates.
487
488         Tests: fast/regions/selection/position-for-point-1-vert-lr.html
489                fast/regions/selection/position-for-point-1-vert-rl.html
490                fast/regions/selection/position-for-point-1.html
491                fast/regions/selection/position-for-point-vert-lr.html
492                fast/regions/selection/position-for-point-vert-rl.html
493                fast/regions/selection/position-for-point.html
494
495         * rendering/RenderBlock.cpp:
496         (WebCore::isChildHitTestCandidate):
497         (WebCore::RenderBlock::positionForPoint):
498         * rendering/RenderBlockFlow.cpp:
499         (WebCore::RenderBlockFlow::positionForPoint): Added.
500         It just redirects the call to the associated RenderNamedFlowFragment instance.
501         * rendering/RenderBlockFlow.h:
502         * rendering/RenderRegion.cpp:
503         (WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Added.
504         It performs the coordinates mapping.
505         (WebCore::RenderRegion::positionForPoint): Added.
506         It determines the corresponding LayoutPoint in the FlowThread the Region
507         is associated to, forwarding the call to the RenderBlock class using the
508         FlowThread's first child block and such new point.
509         * rendering/RenderRegion.h:
510
511 2013-11-11  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
512
513         [curl] Remove unused includes.
514         https://bugs.webkit.org/show_bug.cgi?id=120415
515
516         Reviewed by Csaba Osztrogonác.
517
518         Original patch by 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
519
520         * platform/network/curl/ProxyServerCurl.cpp:
521         * platform/network/curl/ResourceHandleCurl.cpp:
522         * platform/network/curl/ResourceHandleManager.cpp:
523
524 2013-11-11  Csaba Osztrogonác  <ossy@webkit.org>
525
526         URTBF after r159027 to make Apple Windows build happy.
527
528         * platform/graphics/cg/ImageSourceCG.cpp:
529         (WebCore::sharedBufferGetBytesAtPosition):
530
531 2013-11-11  Andreas Kling  <akling@apple.com>
532
533         Kill InlineFlowBox::rendererLineBoxes().
534         <https://webkit.org/b/124141>
535
536         We only ever used this to access the RenderLineBoxList for non-root
537         boxes, and those always have a RenderInline renderer.
538
539         Tighten things up by losing the virtual rendererLineBoxes() and
540         calling RenderInline::lineBoxes() directly.
541
542         Reviewed by Antti Koivisto.
543
544 2013-11-11  Andreas Kling  <akling@apple.com>
545
546         Bring the LineFragmentationData back to RootInlineBox.
547         <https://webkit.org/b/124136>
548
549         Now that we have the simple line layout path, almost all the root
550         line boxes end up with some kind of fragmentation data, so we might
551         as well put the members back on RootInlineBox and avoid the extra
552         allocation (and indirection.)
553
554         1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
555
556         Reviewed by Antti Koivisto.
557
558 2013-11-10  Andreas Kling  <akling@apple.com>
559
560         Shrink RenderInline.
561         <https://webkit.org/b/124134>
562
563         Move the "always create line boxes" bit from RenderInline up to
564         RenderElement. I didn't do this earlier because there were no bits
565         free on RenderObject but thanks to RenderElement we now have tons!
566
567         540 kB progression on HTML5 spec at <http://whatwg.org/c>
568
569         Reviewed by Anders Carlsson.
570
571 2013-11-10  Sam Weinig  <sam@webkit.org>
572
573         Make childShouldCreateRenderer() take a Node reference
574         https://bugs.webkit.org/show_bug.cgi?id=124132
575
576         Reviewed by Andreas Kling.
577
578         The Node passed to childShouldCreateRenderer() is never null.
579
580 2013-11-10  Frédéric Wang  <fred.wang@free.fr>
581
582         CSS direction must be reset to ltr on <math> element.
583         <https://webkit.org/b/124121>
584
585         Reviewed by Darin Adler.
586
587         Test: mathml/presentation/direction.html
588
589         * css/mathml.css:
590         (math): set direction: ltr; on the <math> element.
591
592 2013-11-10  Sam Weinig  <sam@webkit.org>
593
594         Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
595         https://bugs.webkit.org/show_bug.cgi?id=124124
596
597         Reviewed by Anders Carlsson.
598
599         Reduce RenderBlockFlow by one word.
600
601         * rendering/RenderBlock.cpp:
602         * rendering/RenderBlock.h:
603         * rendering/RenderBlockFlow.cpp:
604         * rendering/RenderBlockFlow.h:
605
606 2013-11-10  Antti Koivisto  <antti@apple.com>
607
608         Use start/end instead of textOffset/textLength for simple text runs
609         https://bugs.webkit.org/show_bug.cgi?id=124130
610
611         Reviewed by Oliver Hunt.
612         
613         The code reads better this way.
614
615         * rendering/SimpleLineLayout.cpp:
616         (WebCore::SimpleLineLayout::createTextRuns):
617         * rendering/SimpleLineLayout.h:
618         (WebCore::SimpleLineLayout::Run::Run):
619         * rendering/SimpleLineLayoutFunctions.h:
620         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
621         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
622         (WebCore::SimpleLineLayout::containsTextCaretOffset):
623         (WebCore::SimpleLineLayout::isTextRendered):
624         * rendering/SimpleLineLayoutResolver.h:
625         (WebCore::SimpleLineLayout::RunResolver::Run::text):
626
627 2013-11-10  Antti Koivisto  <antti@apple.com>
628
629         Implement white-space property on simple line layout path
630         https://bugs.webkit.org/show_bug.cgi?id=124122
631
632         Reviewed by Andreas Kling.
633         
634         Support all values of the white-space property and the tab-size property.
635
636         Tests: fast/forms/basic-textareas-simple-lines.html
637                fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
638                fast/text/whitespace/pre-wrap-line-test-simple-lines.html
639                fast/text/whitespace/pre-wrap-long-word-simple-lines.html
640                fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
641
642         * rendering/SimpleLineLayout.cpp:
643         (WebCore::SimpleLineLayout::canUseFor):
644         (WebCore::SimpleLineLayout::isWhitespace):
645         (WebCore::SimpleLineLayout::skipWhitespaces):
646         (WebCore::SimpleLineLayout::textWidth):
647         (WebCore::SimpleLineLayout::measureWord):
648         (WebCore::SimpleLineLayout::createTextRuns):
649         * rendering/SimpleLineLayoutFunctions.cpp:
650         (WebCore::SimpleLineLayout::paintDebugBorders):
651         (WebCore::SimpleLineLayout::paintFlow):
652
653 2013-11-10  Sergio Correia  <sergio.correia@openbossa.org>
654
655         Fix EFL build after r159027
656         https://bugs.webkit.org/show_bug.cgi?id=124127
657
658         Reviewed by Anders Carlsson.
659
660         No new tests, build fix.
661
662         * page/Settings.in: Add std to numeric_limits, since we don't have
663         'using std' directives anymore.
664
665 2013-11-10  Anders Carlsson  <andersca@apple.com>
666
667         Fix build.
668
669         * rendering/RenderMultiColumnBlock.cpp:
670         (WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
671         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
672
673 2013-11-10  Anders Carlsson  <andersca@apple.com>
674
675         Remove all 'std' using directives from WebCore
676         https://bugs.webkit.org/show_bug.cgi?id=124125
677
678         Reviewed by Sam Weinig.
679
680         As per the coding style guidelines.
681
682         * loader/CrossOriginPreflightResultCache.cpp:
683         (WebCore::CrossOriginPreflightResultCache::appendEntry):
684         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
685         * loader/WorkerThreadableLoader.cpp:
686         * loader/appcache/ApplicationCacheStorage.cpp:
687         (WebCore::ApplicationCacheStorage::loadCache):
688         * loader/appcache/ManifestParser.cpp:
689         (WebCore::parseManifest):
690         * loader/cache/MemoryCache.cpp:
691         (WebCore::MemoryCache::deadCapacity):
692         (WebCore::MemoryCache::lruListFor):
693         * page/CaptionUserPreferencesMediaAF.cpp:
694         * page/Chrome.cpp:
695         * page/DOMTimer.cpp:
696         (WebCore::DOMTimer::intervalClampedToMinimum):
697         * page/FocusController.cpp:
698         * page/Frame.cpp:
699         (WebCore::Frame::resizePageRectsKeepingRatio):
700         * page/PageGroupLoadDeferrer.cpp:
701         * page/Settings.cpp:
702         * page/animation/AnimationBase.cpp:
703         (WebCore::solveStepsFunction):
704         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
705         (WebCore::AnimationBase::timeToNextService):
706         (WebCore::AnimationBase::fractionalTime):
707         (WebCore::AnimationBase::getTimeToNextEvent):
708         * page/animation/KeyframeAnimation.cpp:
709         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
710         * platform/DateComponents.cpp:
711         * platform/ScrollAnimator.cpp:
712         (WebCore::ScrollAnimator::handleWheelEvent):
713         * platform/ScrollView.cpp:
714         (WebCore::ScrollView::unscaledVisibleContentSize):
715         (WebCore::ScrollView::setScrollOffset):
716         (WebCore::ScrollView::updateScrollbars):
717         (WebCore::ScrollView::scrollContents):
718         * platform/Scrollbar.cpp:
719         (WebCore::Scrollbar::moveThumb):
720         * platform/ScrollbarThemeComposite.cpp:
721         (WebCore::usedTotalSize):
722         (WebCore::ScrollbarThemeComposite::thumbPosition):
723         (WebCore::ScrollbarThemeComposite::thumbLength):
724         * platform/SharedBuffer.cpp:
725         (WebCore::SharedBuffer::append):
726         (WebCore::SharedBuffer::copyBufferAndClear):
727         (WebCore::SharedBuffer::getSomeData):
728         * platform/ThreadTimers.cpp:
729         (WebCore::ThreadTimers::updateSharedTimer):
730         * platform/Timer.cpp:
731         (WebCore::TimerHeapLessThanFunction::operator()):
732         (WebCore::TimerBase::heapPop):
733         (WebCore::TimerBase::nextUnalignedFireInterval):
734         * platform/URL.cpp:
735         (WebCore::findHostnamesInMailToURL):
736         (WebCore::portAllowed):
737         * platform/audio/AudioResampler.cpp:
738         (WebCore::AudioResampler::setRate):
739         * platform/audio/AudioResamplerKernel.cpp:
740         (WebCore::AudioResamplerKernel::process):
741         * platform/audio/Distance.cpp:
742         (WebCore::DistanceEffect::gain):
743         * platform/audio/DynamicsCompressorKernel.cpp:
744         (WebCore::DynamicsCompressorKernel::process):
745         * platform/audio/EqualPowerPanner.cpp:
746         (WebCore::EqualPowerPanner::pan):
747         * platform/audio/HRTFDatabase.cpp:
748         (WebCore::HRTFDatabase::indexFromElevationAngle):
749         * platform/audio/HRTFElevation.cpp:
750         (WebCore::HRTFElevation::createForSubject):
751         * platform/audio/HRTFKernel.cpp:
752         (WebCore::HRTFKernel::HRTFKernel):
753         (WebCore::HRTFKernel::createInterpolatedKernel):
754         * platform/audio/HRTFPanner.cpp:
755         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
756         * platform/audio/Reverb.cpp:
757         * platform/audio/SincResampler.cpp:
758         (WebCore::SincResampler::process):
759         * platform/cf/URLCF.cpp:
760         * platform/graphics/Color.cpp:
761         (WebCore::makeRGB):
762         (WebCore::makeRGBA):
763         (WebCore::colorFloatToRGBAByte):
764         (WebCore::Color::light):
765         (WebCore::Color::dark):
766         * platform/graphics/CrossfadeGeneratedImage.cpp:
767         * platform/graphics/FloatQuad.cpp:
768         (WebCore::min4):
769         (WebCore::max4):
770         (WebCore::withinEpsilon):
771         * platform/graphics/FloatSize.cpp:
772         (WebCore::FloatSize::isZero):
773         * platform/graphics/FontFastPath.cpp:
774         (WebCore::Font::floatWidthForSimpleText):
775         * platform/graphics/FontPlatformData.cpp:
776         * platform/graphics/GraphicsContext.cpp:
777         * platform/graphics/RoundedRect.cpp:
778         (WebCore::RoundedRect::Radii::expand):
779         * platform/graphics/ShadowBlur.cpp:
780         (WebCore::calculateLobes):
781         (WebCore::computeSliceSizesFromRadii):
782         * platform/graphics/SimpleFontData.cpp:
783         (WebCore::SimpleFontData::initCharWidths):
784         * platform/graphics/WidthIterator.cpp:
785         (WebCore::WidthIterator::WidthIterator):
786         (WebCore::WidthIterator::advanceInternal):
787         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
788         (WebCore::InbandTextTrackPrivateAVF::processCue):
789         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
790         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
791         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
792         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
793         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
794         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
795         * platform/graphics/ca/GraphicsLayerCA.cpp:
796         (WebCore::GraphicsLayerCA::setOpacity):
797         (WebCore::GraphicsLayerCA::setNeedsDisplay):
798         (WebCore::GraphicsLayerCA::setupAnimation):
799         (WebCore::clampedContentsScaleForScale):
800         * platform/graphics/ca/mac/TileController.mm:
801         (WebCore::TileController::getTileIndexRangeForRect):
802         (WebCore::TileController::computeTileCoverageRect):
803         * platform/graphics/cg/GraphicsContextCG.cpp:
804         (WebCore::GraphicsContext::setPlatformShadow):
805         (WebCore::computeLineBoundsAndAntialiasingModeForText):
806         * platform/graphics/cg/ImageBufferCG.cpp:
807         * platform/graphics/cg/ImageBufferDataCG.cpp:
808         (WebCore::ImageBufferData::getData):
809         * platform/graphics/cg/ImageSourceCG.cpp:
810         * platform/graphics/filters/FEDropShadow.cpp:
811         * platform/graphics/filters/FEGaussianBlur.cpp:
812         (WebCore::boxBlur):
813         (WebCore::FEGaussianBlur::platformApplyGeneric):
814         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
815         (WebCore::FEGaussianBlur::calculateStdDeviation):
816         * platform/graphics/gpu/Texture.cpp:
817         (WebCore::Texture::updateSubRect):
818         * platform/graphics/gpu/TilingData.cpp:
819         (WebCore::computeNumTiles):
820         (WebCore::TilingData::tileXIndexFromSrcCoord):
821         (WebCore::TilingData::tileYIndexFromSrcCoord):
822         * platform/graphics/mac/ComplexTextController.cpp:
823         (WebCore::ComplexTextController::ComplexTextController):
824         (WebCore::ComplexTextController::offsetForPosition):
825         (WebCore::ComplexTextController::advance):
826         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
827         * platform/graphics/mac/FontComplexTextMac.cpp:
828         (WebCore::Font::floatWidthForComplexText):
829         * platform/graphics/mac/FontMac.mm:
830         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
831         (WebCore::MediaPlayerPrivateQTKit::duration):
832         * platform/graphics/mac/SimpleFontDataMac.mm:
833         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
834         * platform/graphics/transforms/MatrixTransformOperation.cpp:
835         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
836         * platform/graphics/transforms/RotateTransformOperation.cpp:
837         * platform/graphics/transforms/TransformOperations.cpp:
838         (WebCore::TransformOperations::blendByMatchingOperations):
839         * platform/graphics/transforms/TransformationMatrix.cpp:
840         (WebCore::clampEdgeValue):
841         * platform/mac/ScrollAnimatorMac.mm:
842         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
843         * platform/mac/ScrollViewMac.mm:
844         (WebCore::ScrollView::platformSetContentsSize):
845         (WebCore::ScrollView::platformSetScrollPosition):
846         * platform/mac/ScrollbarThemeMac.mm:
847         * platform/mac/ThemeMac.mm:
848         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
849         (-[WebVideoFullscreenHUDWindowController incrementVolume]):
850         (timeToString):
851         * platform/network/HTTPHeaderMap.cpp:
852         (WebCore::HTTPHeaderMap::copyData):
853         * platform/network/ResourceRequestBase.cpp:
854         * platform/network/ResourceResponseBase.cpp:
855         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
856         * platform/network/cf/ResourceResponseCFNet.cpp:
857         * platform/network/mac/ResourceResponseMac.mm:
858         (WebCore::ResourceResponse::initNSURLResponse):
859         * platform/text/TextBreakIteratorICU.cpp:
860         (WebCore::textClone):
861         (WebCore::textLatin1MoveInPrimaryContext):
862         (WebCore::textLatin1MoveInPriorContext):
863         (WebCore::textInChunkOrOutOfRange):
864         (WebCore::textOpenLatin1):
865         (WebCore::textUTF16MoveInPrimaryContext):
866         (WebCore::textUTF16MoveInPriorContext):
867         (WebCore::textOpenUTF16):
868         * platform/text/TextCodecUTF16.cpp:
869         (WebCore::TextCodecUTF16::encode):
870         * platform/text/TextCodecUTF8.cpp:
871         (WebCore::TextCodecUTF8::encode):
872         * platform/text/TextStream.cpp:
873         * platform/text/mac/LocaleMac.mm:
874         * platform/text/mac/TextCodecMac.cpp:
875         (WebCore::TextCodecMac::decode):
876         * rendering/AutoTableLayout.cpp:
877         (WebCore::AutoTableLayout::recalcColumn):
878         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
879         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
880         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
881         (WebCore::AutoTableLayout::layout):
882         * rendering/FixedTableLayout.cpp:
883         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
884         * rendering/FloatingObjects.cpp:
885         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
886         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
887         (WebCore::FloatingObjects::logicalRightOffset):
888         * rendering/InlineBox.cpp:
889         * rendering/InlineFlowBox.cpp:
890         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
891         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
892         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
893         (WebCore::InlineFlowBox::computeMaxLogicalTop):
894         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
895         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
896         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
897         (WebCore::InlineFlowBox::nodeAtPoint):
898         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
899         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
900         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
901         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
902         * rendering/InlineTextBox.cpp:
903         (WebCore::InlineTextBox::isSelected):
904         (WebCore::InlineTextBox::localSelectionRect):
905         (WebCore::InlineTextBox::placeEllipsisBox):
906         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
907         (WebCore::InlineTextBox::paint):
908         (WebCore::InlineTextBox::selectionStartEnd):
909         (WebCore::InlineTextBox::paintSelection):
910         (WebCore::InlineTextBox::paintCompositionBackground):
911         (WebCore::computeUnderlineOffset):
912         (WebCore::InlineTextBox::paintDecoration):
913         (WebCore::InlineTextBox::paintDocumentMarker):
914         (WebCore::InlineTextBox::paintTextMatchMarker):
915         (WebCore::InlineTextBox::computeRectForReplacementMarker):
916         (WebCore::InlineTextBox::paintCompositionUnderline):
917         * rendering/RenderBlock.cpp:
918         (WebCore::RenderBlock::computeOverflow):
919         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
920         (WebCore::RenderBlock::paintChild):
921         (WebCore::RenderBlock::blockSelectionGap):
922         (WebCore::RenderBlock::logicalLeftSelectionGap):
923         (WebCore::RenderBlock::logicalRightSelectionGap):
924         (WebCore::RenderBlock::calcColumnWidth):
925         (WebCore::RenderBlock::adjustRectForColumns):
926         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
927         (WebCore::RenderBlock::computePreferredLogicalWidths):
928         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
929         (WebCore::updatePreferredWidth):
930         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
931         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
932         * rendering/RenderBlockFlow.cpp:
933         (WebCore::RenderBlockFlow::clearFloats):
934         (WebCore::RenderBlockFlow::layoutBlock):
935         (WebCore::RenderBlockFlow::layoutBlockChild):
936         (WebCore::RenderBlockFlow::collapseMargins):
937         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
938         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
939         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
940         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
941         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
942         (WebCore::calculateMinimumPageHeight):
943         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
944         (WebCore::RenderBlockFlow::removeFloatingObject):
945         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
946         (WebCore::RenderBlockFlow::positionNewFloats):
947         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
948         (WebCore::RenderBlockFlow::addOverhangingFloats):
949         (WebCore::RenderBlockFlow::getClearDelta):
950         (WebCore::RenderBlockFlow::adjustForBorderFit):
951         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
952         (WebCore::RenderBlockFlow::updateLogicalHeight):
953         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
954         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
955         (WebCore::RenderBlockFlow::relayoutForPagination):
956         * rendering/RenderBlockLineLayout.cpp:
957         (WebCore::updateLogicalWidthForLeftAlignedBlock):
958         (WebCore::updateLogicalWidthForRightAlignedBlock):
959         (WebCore::updateLogicalWidthForCenterAlignedBlock):
960         (WebCore::setLogicalWidthForTextRun):
961         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
962         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
963         (WebCore::RenderBlockFlow::layoutLineBoxes):
964         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
965         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
966         (WebCore::tryHyphenating):
967         * rendering/RenderBox.cpp:
968         (WebCore::RenderBox::scrollWidth):
969         (WebCore::RenderBox::scrollHeight):
970         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
971         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
972         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
973         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
974         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
975         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
976         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
977         (WebCore::RenderBox::repaintLayerRectsForImage):
978         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
979         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
980         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
981         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
982         (WebCore::RenderBox::computeLogicalWidthInRegion):
983         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
984         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
985         (WebCore::RenderBox::computeInlineDirectionMargins):
986         (WebCore::RenderBox::computeLogicalHeight):
987         (WebCore::RenderBox::computePercentageLogicalHeight):
988         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
989         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
990         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
991         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
992         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
993         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
994         (WebCore::RenderBox::applyVisualEffectOverflow):
995         (WebCore::RenderBox::addLayoutOverflow):
996         * rendering/RenderBoxModelObject.cpp:
997         (WebCore::RenderBoxModelObject::calculateFillTileSize):
998         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
999         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
1000         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
1001         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1002         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1003         (WebCore::calculateAdjustedInnerBorder):
1004         (WebCore::RenderBoxModelObject::paintBoxShadow):
1005         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
1006         * rendering/RenderDeprecatedFlexibleBox.cpp:
1007         (WebCore::FlexBoxIterator::next):
1008         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
1009         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
1010         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1011         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1012         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1013         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
1014         * rendering/RenderFileUploadControl.cpp:
1015         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1016         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
1017         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
1018         * rendering/RenderImage.cpp:
1019         (WebCore::RenderImage::setImageSizeForAltText):
1020         * rendering/RenderInline.cpp:
1021         (WebCore::computeMargin):
1022         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
1023         (WebCore::RenderInline::paintOutline):
1024         (WebCore::RenderInline::paintOutlineForLine):
1025         * rendering/RenderLayer.cpp:
1026         (WebCore::RenderLayer::clampScrollOffset):
1027         (WebCore::RenderLayer::scrollRectToVisible):
1028         (WebCore::RenderLayer::visibleContentRect):
1029         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1030         (WebCore::RenderLayer::hitTestOverflowControls):
1031         (WebCore::RenderLayer::hitTestLayer):
1032         (WebCore::RenderLayer::calculateLayerBounds):
1033         * rendering/RenderLayerBacking.cpp:
1034         * rendering/RenderLayerModelObject.cpp:
1035         * rendering/RenderLineBoxList.cpp:
1036         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1037         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
1038         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
1039         (WebCore::RenderLineBoxList::paint):
1040         * rendering/RenderListBox.cpp:
1041         (WebCore::RenderListBox::updateFromElement):
1042         (WebCore::RenderListBox::layout):
1043         (WebCore::RenderListBox::computePreferredLogicalWidths):
1044         (WebCore::RenderListBox::size):
1045         (WebCore::RenderListBox::numVisibleItems):
1046         (WebCore::RenderListBox::panScroll):
1047         (WebCore::RenderListBox::scrollHeight):
1048         * rendering/RenderListItem.cpp:
1049         * rendering/RenderListMarker.cpp:
1050         * rendering/RenderMarquee.cpp:
1051         (WebCore::RenderMarquee::marqueeSpeed):
1052         (WebCore::RenderMarquee::computePosition):
1053         (WebCore::RenderMarquee::timerFired):
1054         * rendering/RenderMediaControls.cpp:
1055         * rendering/RenderMenuList.cpp:
1056         (WebCore::RenderMenuList::updateOptionsWidth):
1057         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
1058         (WebCore::RenderMenuList::computePreferredLogicalWidths):
1059         * rendering/RenderMeter.cpp:
1060         * rendering/RenderMultiColumnBlock.cpp:
1061         * rendering/RenderMultiColumnSet.cpp:
1062         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
1063         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
1064         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
1065         * rendering/RenderNamedFlowFragment.cpp:
1066         * rendering/RenderObject.cpp:
1067         (WebCore::RenderObject::drawLineForBoxSide):
1068         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
1069         (WebCore::RenderObject::caretMaxOffset):
1070         * rendering/RenderProgress.cpp:
1071         * rendering/RenderRegion.cpp:
1072         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1073         * rendering/RenderReplaced.cpp:
1074         (WebCore::RenderReplaced::shouldPaint):
1075         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1076         (WebCore::RenderReplaced::computePreferredLogicalWidths):
1077         * rendering/RenderRubyBase.cpp:
1078         * rendering/RenderRubyRun.cpp:
1079         (WebCore::RenderRubyRun::getOverhang):
1080         * rendering/RenderRubyText.cpp:
1081         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
1082         * rendering/RenderScrollbarPart.cpp:
1083         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1084         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1085         * rendering/RenderSearchField.cpp:
1086         (WebCore::RenderSearchField::computeControlLogicalHeight):
1087         * rendering/RenderTable.cpp:
1088         (WebCore::RenderTable::updateLogicalWidth):
1089         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1090         (WebCore::RenderTable::layout):
1091         (WebCore::RenderTable::computePreferredLogicalWidths):
1092         (WebCore::RenderTable::calcBorderStart):
1093         (WebCore::RenderTable::calcBorderEnd):
1094         (WebCore::RenderTable::outerBorderBefore):
1095         (WebCore::RenderTable::outerBorderAfter):
1096         (WebCore::RenderTable::outerBorderStart):
1097         (WebCore::RenderTable::outerBorderEnd):
1098         * rendering/RenderTableCell.cpp:
1099         (WebCore::RenderTableCell::parseColSpanFromDOM):
1100         (WebCore::RenderTableCell::parseRowSpanFromDOM):
1101         (WebCore::RenderTableCell::logicalWidthFromColumns):
1102         (WebCore::RenderTableCell::computePreferredLogicalWidths):
1103         (WebCore::RenderTableCell::layout):
1104         (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
1105         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
1106         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
1107         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
1108         * rendering/RenderTableSection.cpp:
1109         (WebCore::RenderTableSection::ensureRows):
1110         (WebCore::RenderTableSection::calcRowLogicalHeight):
1111         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
1112         (WebCore::RenderTableSection::layoutRows):
1113         (WebCore::RenderTableSection::firstLineBaseline):
1114         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
1115         (WebCore::RenderTableSection::setCachedCollapsedBorder):
1116         (WebCore::RenderTableSection::cachedCollapsedBorder):
1117         * rendering/RenderText.cpp:
1118         (WebCore::makeCapitalized):
1119         (WebCore::RenderText::absoluteRectsForRange):
1120         (WebCore::RenderText::absoluteQuadsForRange):
1121         (WebCore::maxWordFragmentWidth):
1122         (WebCore::RenderText::computePreferredLogicalWidths):
1123         * rendering/RenderTextControl.cpp:
1124         (WebCore::RenderTextControl::computePreferredLogicalWidths):
1125         * rendering/RenderTextControlSingleLine.cpp:
1126         * rendering/RenderThemeMac.mm:
1127         (WebCore::RenderThemeMac::paintProgressBar):
1128         (WebCore::RenderThemeMac::paintMenuListButton):
1129         * rendering/RenderWidget.cpp:
1130         * rendering/RootInlineBox.cpp:
1131         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
1132         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
1133         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
1134         (WebCore::RootInlineBox::blockDirectionPointInLine):
1135         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
1136         (WebCore::setAscentAndDescent):
1137         (WebCore::RootInlineBox::ascentAndDescentForBox):
1138         * rendering/mathml/RenderMathMLRoot.cpp:
1139         (WebCore::RenderMathMLRoot::layout):
1140         * rendering/style/RenderStyle.cpp:
1141         (WebCore::calcConstraintScaleFor):
1142         (WebCore::RenderStyle::setFontSize):
1143         (WebCore::RenderStyle::getShadowExtent):
1144         (WebCore::RenderStyle::getShadowInsetExtent):
1145         (WebCore::RenderStyle::getShadowHorizontalExtent):
1146         (WebCore::RenderStyle::getShadowVerticalExtent):
1147         * rendering/style/SVGRenderStyle.cpp:
1148         * rendering/style/ShadowData.cpp:
1149         (WebCore::calculateShadowExtent):
1150         * rendering/svg/RenderSVGResourceFilter.cpp:
1151         * rendering/svg/RenderSVGRoot.cpp:
1152         * rendering/svg/SVGInlineFlowBox.cpp:
1153         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1154         * rendering/svg/SVGInlineTextBox.cpp:
1155         (WebCore::SVGInlineTextBox::localSelectionRect):
1156         * svg/SVGAnimatedNumber.cpp:
1157         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1158         * svg/animation/SMILTimeContainer.cpp:
1159         (WebCore::SMILTimeContainer::startTimer):
1160         (WebCore::SMILTimeContainer::updateAnimations):
1161         * svg/animation/SVGSMILElement.cpp:
1162         (WebCore::SVGSMILElement::simpleDuration):
1163         (WebCore::SVGSMILElement::repeatingDuration):
1164         (WebCore::SVGSMILElement::resolveActiveEnd):
1165         (WebCore::SVGSMILElement::resolveInterval):
1166         (WebCore::SVGSMILElement::resolveFirstInterval):
1167         (WebCore::SVGSMILElement::resolveNextInterval):
1168         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
1169         * xml/XMLTreeViewer.cpp:
1170         * xml/parser/XMLDocumentParser.cpp:
1171         * xml/parser/XMLDocumentParserLibxml2.cpp:
1172         (WebCore::OffsetBuffer::readOutBytes):
1173
1174 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1175
1176         [AX] Clean up static_cast<> to cast from AccessibilityObject 
1177         https://bugs.webkit.org/show_bug.cgi?id=124032
1178
1179         Reviewed by Mario Sanchez Prada.
1180
1181         ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
1182         So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
1183
1184         This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
1185         are generated.
1186
1187         - toAccessibilityARIAGridRow()
1188         - toAccessibilityImageMapLink()
1189         - toAccessibilityListBox()
1190         - toAccessibilityListBoxOption()
1191         - toAccessibilityMenuListOption()
1192         - toAccessibilityMenuListPopup()
1193         - toAccessibilityScrollbar()
1194         - toAccessibilitySlider()
1195
1196         No new tests, no behavior changes.
1197
1198         * accessibility/AXObjectCache.cpp:
1199         (WebCore::AXObjectCache::focusedImageMapUIElement):
1200         * accessibility/AccessibilityARIAGridRow.h:
1201         * accessibility/AccessibilityImageMapLink.h:
1202         * accessibility/AccessibilityListBox.cpp:
1203         (WebCore::AccessibilityListBox::setSelectedChildren):
1204         (WebCore::AccessibilityListBox::selectedChildren):
1205         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
1206         * accessibility/AccessibilityListBox.h:
1207         * accessibility/AccessibilityListBoxOption.h:
1208         * accessibility/AccessibilityMenuList.cpp:
1209         (WebCore::AccessibilityMenuList::addChildren):
1210         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
1211         * accessibility/AccessibilityMenuListOption.h:
1212         * accessibility/AccessibilityMenuListPopup.cpp:
1213         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1214         * accessibility/AccessibilityMenuListPopup.h:
1215         * accessibility/AccessibilityObject.h:
1216         (WebCore::AccessibilityObject::isListBoxOption):
1217         (WebCore::AccessibilityObject::isSliderThumb):
1218         * accessibility/AccessibilityRenderObject.cpp:
1219         (WebCore::AccessibilityRenderObject::getDocumentLinks):
1220         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1221         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
1222         * accessibility/AccessibilityScrollView.cpp:
1223         (WebCore::AccessibilityScrollView::addChildScrollbar):
1224         * accessibility/AccessibilityScrollbar.h:
1225         * accessibility/AccessibilitySlider.cpp:
1226         (WebCore::AccessibilitySlider::addChildren):
1227         * accessibility/AccessibilitySlider.h:
1228         * accessibility/AccessibilitySpinButton.cpp:
1229         (WebCore::AccessibilitySpinButton::addChildren):
1230         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
1231         (webkitAccessibleSelectionClearSelection):
1232         (webkitAccessibleSelectionSelectAllSelection):
1233         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1234         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1235         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1236         * rendering/RenderMenuList.cpp:
1237         (WebCore::RenderMenuList::didUpdateActiveOption):
1238
1239 2013-11-10  Andreas Kling  <akling@apple.com>
1240
1241         Rebaseline bindings tests after r158997.
1242
1243         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1244
1245 2013-11-10  Brendan Long  <b.long@cablelabs.com>
1246
1247         [GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
1248         https://bugs.webkit.org/show_bug.cgi?id=124020
1249
1250         Reviewed by Philippe Normand.
1251
1252         No new tests because this is just refactoring.
1253
1254         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
1255         (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
1256         (WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
1257         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
1258         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
1259         (WebCore::textTrackPrivateEventCallback):
1260         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
1261         (WebCore::InbandTextTrackPrivateGStreamer::disconnect):
1262         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1263         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
1264         (webkit_text_combiner_pad_init): Initialize tags to 0.
1265         (webkitTextCombinerPadFinalize): Clear tags.
1266         (webkitTextCombinerPadGetProperty): Handling "tags" property.
1267         (webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
1268         (webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
1269         (webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
1270         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
1271         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1272         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
1273         (WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
1274         (WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
1275         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
1276         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
1277         (WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
1278         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
1279         (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
1280         (WebCore::VideoTrackPrivateGStreamer::disconnect):
1281         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
1282
1283 2013-11-10  Andreas Kling  <akling@apple.com>
1284
1285         Generate type casting helpers for Widget classes.
1286         <https://webkit.org/b/124120>
1287
1288         Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
1289         toFoo() helpers we had for Widget subclasses. Fixed up a handful
1290         of places that were still using static_cast.
1291
1292         Reviewed by Antti Koivisto.
1293
1294 2013-11-10  Andreas Kling  <akling@apple.com>
1295
1296         Remove unused FragmentationDisabler class.
1297         <https://webkit.org/b/124118>
1298
1299         This RAII object was added in r144744 to avoid a crash when using
1300         MathML inside CSS regions. Its only user was removed in r157070.
1301
1302         Reviewed by Antti Koivisto.
1303
1304 2013-11-10  Andreas Kling  <akling@apple.com>
1305
1306         Simplify some is-this-a-MathML-element? checks.
1307         <https://webkit.org/b/124119>
1308
1309         As of r158198, the MathML-ness of an Element is determined by
1310         a Node flag, so there's no need to cast to Element before checking
1311         on this. Simplify accordingly.
1312
1313         Reviewed by Antti Koivisto.
1314
1315 2013-11-10  Andreas Kling  <akling@apple.com>
1316
1317         Remove RenderTheme::shouldOpenPickerWithF4Key().
1318
1319         Rubber-stamped by Anders Carlsson.
1320
1321 2013-11-09  Andreas Kling  <akling@apple.com>
1322
1323         CSSValuePool::createFontFamilyValue() should return PassRef.
1324         <https://webkit.org/b/124114>
1325
1326         Unlike createFontFaceValue(), createFontFamilyValue() can never
1327         fail to return an object and thus should return PassRef.
1328
1329         Reviewed by Anders Carlsson.
1330
1331 2013-11-09  Andreas Kling  <akling@apple.com>
1332
1333         RenderIFrame should display its name correctly in DRT output.
1334         <https://webkit.org/b/124117>
1335
1336         Nuke an age-old FIXME about making RenderIFrame show its true name
1337         in DRT output. No more "RenderPartObject {IFRAME}"!
1338
1339         Reviewed by Anders Carlsson.
1340
1341 2013-11-09  Andreas Kling  <akling@apple.com>
1342
1343         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
1344         <https://webkit.org/b/124105>
1345
1346         Make walkTree() take a RenderElement so we can use the non-virtual
1347         firstChild() internally. All call sites had pointers to compatible
1348         objects already.
1349
1350         Reviewed by Anders Carlsson.
1351
1352 2013-11-09  Andreas Kling  <akling@apple.com>
1353
1354         RenderMathMLFenced should pass around operators in tighter types.
1355         <https://webkit.org/b/124115>
1356
1357         Store operator renderers in RenderMathMLOperator pointers instead
1358         of passing them around as RenderObject.
1359
1360         Reviewed by Martin Robinson.
1361
1362 2013-11-09  Andreas Kling  <akling@apple.com>
1363
1364         Use RENDER_OBJECT_TYPE_CASTS for more types.
1365         <https://webkit.org/b/124112>
1366
1367         Generate toRenderFoo() type casting helpers for these classes:
1368
1369             - RenderCombineText
1370             - RenderDetailsMarker
1371             - RenderListMarker
1372             - RenderVideo
1373             - RenderView
1374
1375         Reviewed by Anders Carlsson.
1376
1377 2013-11-09  Andreas Kling  <akling@apple.com>
1378
1379         Move MathML type checking virtuals to RenderObject.
1380         <https://webkit.org/b/124111>
1381
1382         Previously, checking the type of a MathML renderer would require
1383         that you first check if it's a RenderMathMLBlock, and then casting
1384         to that type to access the check you really wanted.
1385
1386         This change moves all the isRenderMathMLFoo() virtual functions
1387         to RenderObject. I also made sure all the overloads were private
1388         and marked them OVERRIDE/FINAL as appropriate.
1389
1390         Finally I replaced all the hand-written casting functions with
1391         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
1392
1393         Reviewed by Anders Carlsson.
1394
1395 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
1396
1397         [MathML] Poor spacing around delimiters in MathML Torture Test 14
1398         https://bugs.webkit.org/show_bug.cgi?id=122837
1399
1400         Reviewed by Brent Fulgham.
1401
1402         Instead of stretching the vertical bar with the stretchable version, just repeat
1403         the normal vertical bar. This follows what Gecko does when rendering tall vertical
1404         bars and also works around an issue with STIX fonts leading to poor spacing in
1405         formulas.
1406
1407         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
1408         normal variant.
1409
1410 2013-11-09  Anders Carlsson  <andersca@apple.com>
1411
1412         Encode form data using the KeyedEncoder
1413         https://bugs.webkit.org/show_bug.cgi?id=124107
1414
1415         Reviewed by Sam Weinig.
1416
1417         * platform/KeyedCoding.h:
1418         (WebCore::KeyedEncoder::encodeEnum):
1419         * platform/network/FormData.cpp:
1420         (WebCore::encodeElement):
1421         (WebCore::FormData::encode):
1422         * platform/network/FormData.h:
1423
1424 2013-11-09  Sam Weinig  <sam@webkit.org>
1425
1426         Modernize CanvasObserverProxy
1427         https://bugs.webkit.org/show_bug.cgi?id=124106
1428
1429         Reviewed by Anders Carlsson.
1430
1431         * css/CSSCanvasValue.h:
1432
1433 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
1434
1435         Move RunLoop from WebCore to WTF
1436         https://bugs.webkit.org/show_bug.cgi?id=116606
1437
1438         Reviewed by Anders Carlsson.
1439
1440         * CMakeLists.txt:
1441         * GNUmakefile.list.am:
1442         * PlatformBlackBerry.cmake:
1443         * PlatformEfl.cmake:
1444         * PlatformGTK.cmake:
1445         * PlatformWin.cmake:
1446         * WebCore.exp.in:
1447         * WebCore.vcxproj/WebCore.vcxproj:
1448         * WebCore.xcodeproj/project.pbxproj:
1449         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1450         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1451
1452 2013-11-09  Andreas Kling  <akling@apple.com>
1453
1454         Tighten typing in SVGResourcesCycleSolver a bit.
1455         <https://webkit.org/b/124104>
1456
1457         Make the SVGResourcesCycleSolver constructor take a RenderElement&
1458         and a SVGResources&.
1459
1460         While I was in the neighborhood, also converted one loop to use a
1461         renderer iterator instead of walking siblings manually.
1462
1463         Finally used "auto" to clean up some overly wordy loops.
1464
1465         Reviewed by Anders Carlsson.
1466
1467 2013-11-09  Andreas Kling  <akling@apple.com>
1468
1469         Beat SVGRenderSupport with the RenderElement stick.
1470         <https://webkit.org/b/124102>
1471
1472         Tighten up all the SVGRenderSupport helper functions by making them
1473         take const RenderElements references instead of raw RenderObject
1474         pointers as much as possible.
1475
1476         This tunes up a bunch of branchy style() calls.
1477
1478         The patch looks big but it's mostly mechanical. I just changed the
1479         signatures and then worked backwards until everything built again.
1480
1481         Reviewed by Antti Koivisto.
1482
1483 2013-11-09  Andreas Kling  <akling@apple.com>
1484
1485         SVGTextLayoutAttributes always has a RenderSVGInlineText.
1486         <https://webkit.org/b/124101>
1487
1488         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
1489         "context" so make context() return a reference.
1490
1491         Reviewed by Antti Koivisto.
1492
1493 2013-11-09  Andreas Kling  <akling@apple.com>
1494
1495         Move BindingSecurity stuff under JSDOMBinding umbrella.
1496         <https://webkit.org/b/124099>
1497
1498         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
1499         demo here: <http://www.jasondavies.com/maps/rotate/>
1500
1501         Putting it together with the rest of the JSDOMBinding code takes
1502         CPU time spent in there from 8.7% to 6.5%. The abstraction was
1503         only used to support alternate JS engines in the past.
1504
1505         Reviewed by Antti Koivisto.
1506
1507 2013-11-08  Brady Eidson  <beidson@apple.com>
1508
1509         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
1510         https://bugs.webkit.org/show_bug.cgi?id=124088
1511
1512         Reviewed by Tim Horton.
1513 +
1514         * CMakeLists.txt:
1515         * GNUmakefile.list.am:
1516         * WebCore.vcxproj/WebCore.vcxproj:
1517         * WebCore.xcodeproj/project.pbxproj:
1518
1519         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
1520
1521         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
1522         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
1523
1524         * Modules/indexeddb/IDBBackingStoreInterface.h:
1525         * Modules/indexeddb/IDBCallbacks.h:
1526         * Modules/indexeddb/IDBCursor.cpp:
1527         * Modules/indexeddb/IDBCursorBackend.cpp:
1528         * Modules/indexeddb/IDBCursorBackend.h:
1529         * Modules/indexeddb/IDBDatabase.cpp:
1530         * Modules/indexeddb/IDBDatabase.h:
1531         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1532         * Modules/indexeddb/IDBIndex.cpp:
1533         * Modules/indexeddb/IDBIndex.h:
1534         * Modules/indexeddb/IDBIndexWriter.h:
1535         * Modules/indexeddb/IDBObjectStore.cpp:
1536         * Modules/indexeddb/IDBObjectStore.h:
1537         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1538         * Modules/indexeddb/IDBOpenDBRequest.h:
1539         * Modules/indexeddb/IDBPendingDeleteCall.h:
1540         * Modules/indexeddb/IDBRequest.cpp:
1541         * Modules/indexeddb/IDBRequest.h:
1542         * Modules/indexeddb/IDBTransaction.cpp:
1543         * Modules/indexeddb/IDBTransaction.h:
1544         * Modules/indexeddb/IDBTransactionBackend.cpp:
1545         * Modules/indexeddb/IDBTransactionBackend.h:
1546         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1547         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1548         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1549         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1550         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
1551         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
1552
1553 2013-11-08  Andreas Kling  <akling@apple.com>
1554
1555         Reindent JSDOMBinding.h (finally.)
1556
1557         Rubber-stamped by Sam Weinig.
1558
1559 2013-11-08  Sam Weinig  <sam@webkit.org>
1560
1561         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
1562         https://bugs.webkit.org/show_bug.cgi?id=124096
1563
1564         Reviewed by Andreas Kling.
1565
1566         Pass MutableStylePropertySet by reference. It is never null.
1567
1568 2013-11-08  Anders Carlsson  <andersca@apple.com>
1569
1570         Implement encoding of arrays of objects
1571         https://bugs.webkit.org/show_bug.cgi?id=124091
1572
1573         Reviewed by Beth Dakin.
1574
1575         * history/HistoryItem.cpp:
1576         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1577         Encode the rest of the members.
1578
1579         * platform/KeyedCoding.h:
1580         (WebCore::KeyedEncoder::encodeObjects):
1581         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
1582
1583 2013-11-08  Tim Horton  <timothy_horton@apple.com>
1584
1585         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
1586         https://bugs.webkit.org/show_bug.cgi?id=123944
1587
1588         Reviewed by Simon Fraser.
1589
1590         Ensure that the tile cache retrieves repaint rects from the tile layer,
1591         not from the tiled backing layer.
1592
1593         * platform/graphics/ca/PlatformCALayer.h:
1594         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1595         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1596         (PlatformCALayerMac::enumerateRectsBeingDrawn):
1597         Allow the PlatformCALayer to decide how to enumerate rects to paint.
1598
1599         * WebCore.exp.in:
1600         * platform/graphics/mac/WebLayer.h:
1601         Add RepaintRectList, remove some unnecessary WebCore::s.
1602
1603         * platform/graphics/mac/WebLayer.mm:
1604         (WebCore::collectRectsToPaint):
1605         Factor collectRectsToPaint out; it just grabs the rects from
1606         the layer and makes the decision whether to repaint the bounds
1607         of the dirty region or just the subregions.
1608
1609         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
1610         so that TileController can collect rects from the appropriate source
1611         (the Tile layer) and other layers just continue grabbing them from
1612         their relevant layers.
1613
1614         Make sure that the list that comes from collectRectsToPaint() always
1615         has at least one rect in it (appending the clip bounds if we don't
1616         want to repaint subregions) so we can simplify logic in drawLayerContents.
1617
1618         (WebCore::drawLayerContents):
1619         Remove code to support CompositingCoordinatesBottomUp, as it's only
1620         used on Windows, so this Mac-specific code doesn't need to support it.
1621
1622         Simplify logic given that dirtyRects will always be non-empty.
1623
1624         (-[WebLayer drawInContext:]):
1625         (-[WebSimpleLayer setNeedsDisplayInRect:]):
1626         * platform/graphics/ca/mac/TileController.mm:
1627         (WebCore::TileController::platformCALayerPaintContents):
1628         Adopt collectRectsToPaint.
1629
1630 2013-11-08  Anders Carlsson  <andersca@apple.com>
1631
1632         Implement more KeyedEncoder functionality
1633         https://bugs.webkit.org/show_bug.cgi?id=124089
1634
1635         Reviewed by Beth Dakin.
1636
1637         * bindings/js/SerializedScriptValue.h:
1638         * history/HistoryItem.cpp:
1639         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1640         * platform/KeyedCoding.h:
1641         (WebCore::KeyedEncoder::encodeConditionalObject):
1642
1643 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
1644
1645         getCueAsHTML() on an empty cue should return a document fragment
1646         https://bugs.webkit.org/show_bug.cgi?id=124084
1647
1648         Reviewed by Darin Adler.
1649
1650         Test: media/track/track-cue-empty-cue-text.html
1651
1652         * html/track/WebVTTParser.cpp:
1653         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
1654             passed an empty string.
1655
1656 2013-11-08  Anders Carlsson  <andersca@apple.com>
1657
1658         KeyedEncoder should be able to encoder objects
1659         https://bugs.webkit.org/show_bug.cgi?id=124085
1660
1661         Reviewed by Sam Weinig.
1662
1663         * history/HistoryItem.cpp:
1664         (WebCore::HistoryItem::encodeBackForwardTree):
1665         Encode the root object.
1666
1667         (WebCore::HistoryItem::encodeBackForwardTreeNode):
1668         Encode the target.
1669
1670         * history/HistoryItem.h:
1671         Add new members.
1672
1673         * platform/KeyedCoding.h:
1674         (WebCore::KeyedEncoder::encodeObject):
1675         Call beginObject, call the functor and then call endObject().
1676
1677 2013-11-08  Sam Weinig  <sam@webkit.org>
1678
1679         Teach CanvasObserver about references
1680         https://bugs.webkit.org/show_bug.cgi?id=124082
1681
1682         Reviewed by Anders Carlsson.
1683
1684         * css/CSSCanvasValue.cpp:
1685         * css/CSSCanvasValue.h:
1686         * html/HTMLCanvasElement.cpp:
1687         * html/HTMLCanvasElement.h:
1688
1689 2013-11-08  Anders Carlsson  <andersca@apple.com>
1690
1691         Begin stubbing out a KeyedEncoder class in WebCore
1692         https://bugs.webkit.org/show_bug.cgi?id=124079
1693
1694         Reviewed by Sam Weinig.
1695
1696         * WebCore.exp.in:
1697         Add symbol needed by WebCore.
1698
1699         * WebCore.xcodeproj/project.pbxproj:
1700         Add new header file.
1701
1702         * history/HistoryItem.cpp:
1703         (WebCore::HistoryItem::encodeBackForwardTree):
1704         * history/HistoryItem.h:
1705         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
1706
1707         * platform/KeyedCoding.h:
1708         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
1709
1710 2013-11-08  Brady Eidson  <beidson@apple.com>
1711
1712         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
1713         https://bugs.webkit.org/show_bug.cgi?id=124077
1714
1715         Reviewed by Alexey Proskuryakov.
1716
1717         The abstraction is no longer needed.
1718
1719         * CMakeLists.txt:
1720         * GNUmakefile.list.am:
1721         * WebCore.xcodeproj/project.pbxproj:
1722
1723         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
1724
1725         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
1726         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
1727
1728         * Modules/indexeddb/IDBBackingStoreInterface.h:
1729         * Modules/indexeddb/IDBCursorBackend.cpp:
1730         * Modules/indexeddb/IDBCursorBackend.h:
1731         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1732         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1733         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1734         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1735         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1736         * Modules/indexeddb/IDBTransactionCoordinator.h:
1737         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1738         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1739         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1740         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1741
1742 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
1743
1744         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
1745         https://bugs.webkit.org/show_bug.cgi?id=124075
1746
1747         Reviewed by Beth Dakin.
1748         
1749         In r155660 I removed some scrollbar-related layouts when scrollbars
1750         are in overlay mode.
1751         
1752         However, ScrollView::updateScrollbars() has a case where we still need
1753         to do multiple pases, related to its "Never ever try to both gain/lose a
1754         scrollbar in the same pass" comment. When we avoid making a new scrollbar
1755         because the other was removed, we need to do another pass to bring the
1756         correct scrollbar back.
1757
1758         Can't test overlay scrollbars in tests.
1759
1760         * platform/ScrollView.cpp:
1761         (WebCore::ScrollView::updateScrollbars):
1762
1763 2013-11-08  Hans Muller  <hmuller@adobe.com>
1764
1765         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
1766         https://bugs.webkit.org/show_bug.cgi?id=123769
1767
1768         Reviewed by Dirk Schulze.
1769
1770         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
1771         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
1772         method now generates intervals with Y coordinates that begin at the image shape's
1773         bounds.y - shape-margin, which may be less than 0.
1774
1775         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
1776         by the shape-margin. A non-const overload of the method was added to centralize all
1777         access to m_intervalLists.
1778
1779         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
1780               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
1781
1782         * rendering/shapes/RasterShape.cpp:
1783         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
1784         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
1785         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
1786         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
1787         * rendering/shapes/RasterShape.h:
1788         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
1789         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
1790
1791 2013-11-08  Piotr Grad  <p.grad@samsung.com>
1792
1793         Ended event should work also when playback rate is negative
1794         https://bugs.webkit.org/show_bug.cgi?id=123879
1795
1796         Reviewed by Eric Carlson.
1797
1798         According to W3C specification playback is ended also when playback rate is
1799         negative and position is the earliest possible position.
1800
1801         Test: media/video-ended-event-negative-playback.html
1802
1803         * html/HTMLMediaElement.cpp:
1804         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1805
1806 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1807
1808         Checking for TypeError in RTCPeerConnection object creation
1809         https://bugs.webkit.org/show_bug.cgi?id=124049
1810
1811         Reviewed by Eric Carlson.
1812
1813         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
1814         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
1815
1816         Please notice that this patch does not make every tests run as expected,
1817         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
1818
1819         Existing tests were updated.
1820
1821         * GNUmakefile.list.am:
1822         * Modules/mediastream/RTCPeerConnection.idl:
1823         * UseJSC.cmake:
1824         * WebCore.vcxproj/WebCore.vcxproj:
1825         * WebCore.vcxproj/WebCore.vcxproj.filters:
1826         * WebCore.xcodeproj/project.pbxproj:
1827         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
1828         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
1829
1830 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1831
1832         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
1833         https://bugs.webkit.org/show_bug.cgi?id=124074
1834
1835         Reviewed by Sam Weinig.
1836
1837         Just a straightforward conversion from const pointers to const references.
1838
1839         Also, remove unneeded argument from FloatingObjects constructor.
1840
1841         No new tests, no behavior change.
1842
1843         * rendering/FloatingObjects.cpp:
1844         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1845         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
1846         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
1847         (WebCore::FloatingObjects::FloatingObjects):
1848         (WebCore::FloatingObjects::clearLineBoxTreePointers):
1849         (WebCore::FloatingObjects::computePlacedFloatsTree):
1850         (WebCore::shapeInfoForFloat):
1851         (WebCore::::updateOffsetIfNeeded):
1852         (WebCore::::collectIfNeeded):
1853         (WebCore::::heightRemaining):
1854         * rendering/FloatingObjects.h:
1855         * rendering/RenderBlockFlow.cpp:
1856         (WebCore::RenderBlockFlow::createFloatingObjects):
1857
1858 2013-11-08  Sam Weinig  <sam@webkit.org>
1859
1860         Teach SubframeLoader a bit about references
1861         https://bugs.webkit.org/show_bug.cgi?id=124076
1862
1863         Reviewed by Anders Carlsson.
1864
1865         * html/HTMLAppletElement.cpp:
1866         * html/HTMLFrameElementBase.cpp:
1867         * html/HTMLMediaElement.cpp:
1868         * loader/SubframeLoader.cpp:
1869         * loader/SubframeLoader.h:
1870
1871 2013-11-08  Brady Eidson  <beidson@apple.com>
1872
1873         Blind Windows build-fix attempt after r158959
1874
1875         * WebCore.vcxproj/WebCore.vcxproj:
1876
1877 2013-11-08  Brady Eidson  <beidson@apple.com>
1878
1879         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
1880         https://bugs.webkit.org/show_bug.cgi?id=124068
1881
1882         Reviewed by Anders Carlsson.
1883
1884         * CMakeLists.txt:
1885         * GNUmakefile.list.am:
1886         * WebCore.xcodeproj/project.pbxproj:
1887
1888         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
1889
1890         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
1891         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
1892
1893         * Modules/indexeddb/IDBCallbacks.h:
1894         * Modules/indexeddb/IDBCursor.cpp:
1895         * Modules/indexeddb/IDBCursor.h:
1896         * Modules/indexeddb/IDBCursorWithValue.cpp:
1897         * Modules/indexeddb/IDBCursorWithValue.h:
1898         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1899         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1900         * Modules/indexeddb/IDBRequest.cpp:
1901         * Modules/indexeddb/IDBRequest.h:
1902         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1903         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1904         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1905         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1906         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
1907         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
1908
1909 2013-11-08  Sam Weinig  <sam@webkit.org>
1910
1911         Modernize FrameLoader a bit
1912         https://bugs.webkit.org/show_bug.cgi?id=124073
1913
1914         Reviewed by Anders Carlsson.
1915
1916         * loader/FrameLoader.cpp:
1917         * loader/FrameLoader.h:
1918         Use std::unique_ptrs rather than OwnPtrs.
1919
1920         * loader/MixedContentChecker.cpp:
1921         * loader/MixedContentChecker.h:
1922         Switch to hold a Frame& rather than Frame*.
1923
1924 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
1925
1926         Remove code guarded with ENABLE(STREAM)
1927         https://bugs.webkit.org/show_bug.cgi?id=123667
1928
1929         Reviewed by Anders Carlsson.
1930
1931         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
1932         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
1933         leaving this code unmaintained.
1934
1935         * fileapi/FileReaderLoader.cpp:
1936         * fileapi/FileReaderLoader.h:
1937
1938 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
1939
1940         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
1941         https://bugs.webkit.org/show_bug.cgi?id=123931
1942
1943         Reviewed by Sam Weinig.
1944
1945         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
1946         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
1947         moves almost all of the logic into FloatingObjects, making a small
1948         reduction in the amount that RenderBlockFlow needs to know about the
1949         implementation of FloatingObjects.
1950
1951         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
1952         and roundToInt itself so that all of it's callers can be simplified.
1953
1954         No new tests, no new behavior.
1955
1956         * rendering/FloatingObjects.cpp:
1957         (WebCore::rangesIntersect):
1958         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
1959         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
1960         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
1961         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
1962         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
1963         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
1964         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
1965         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
1966         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
1967         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
1968         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
1969         (WebCore::FloatingObjects::logicalLeftOffset):
1970         (WebCore::FloatingObjects::logicalRightOffset):
1971         * rendering/FloatingObjects.h:
1972         * rendering/LineWidth.cpp:
1973         (WebCore::LineWidth::fitBelowFloats):
1974         * rendering/RenderBlockFlow.cpp:
1975         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
1976         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
1977         (WebCore::RenderBlockFlow::getClearDelta):
1978         * rendering/RenderBlockFlow.h:
1979
1980 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
1981
1982         https://bugs.webkit.org/show_bug.cgi?id=124064
1983         Some WebCrypto files are not in correct directories
1984
1985         Rubber-stamped by Anders Carlsson.
1986
1987         * WebCore.xcodeproj/project.pbxproj:
1988         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
1989         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
1990         * crypto/CryptoKeyAES.cpp: Removed.
1991         * crypto/CryptoKeyAES.h: Removed.
1992         * crypto/CryptoKeyMac.cpp: Removed.
1993         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
1994         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
1995         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
1996         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
1997         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
1998
1999 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
2000
2001         Implement JWK key import for HMAC and AES-CBC
2002         https://bugs.webkit.org/show_bug.cgi?id=124059
2003
2004         Reviewed by Anders Carlsson.
2005
2006         Tests: crypto/subtle/aes-cbc-import-jwk.html
2007                crypto/subtle/hmac-import-jwk.html
2008                crypto/subtle/import-jwk.html
2009
2010         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
2011         we'll transform these into parsed KeyData subclasses before passing to algorithms.
2012
2013         CryptoKeySerialization is a base class for handling all these formats.
2014
2015         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
2016         
2017         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
2018         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
2019         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
2020         a nice freshly parsed JSON, no getters or anything.
2021         (WebCore::getBooleanFromJSON): Ditto.
2022         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
2023         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
2024         (WebCore::createHMACParameters): A simple helper.
2025         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
2026         you can have algorithm parameters both inside a JWK key and passed as importKey()
2027         arguments. They need to agree, whatever that means for specific serialization's
2028         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
2029         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
2030         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
2031         both JWK and the caller agree.
2032         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
2033         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
2034         subclass.
2035
2036         * bindings/js/JSSubtleCryptoCustom.cpp:
2037         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
2038         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
2039         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
2040
2041         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
2042         * crypto/CryptoAlgorithm.h:
2043         Updated signature for importKey to one that makes more sense. Decoding formats all
2044         the way from a binary blob is not something that CryptoAlgorithm subclasses should
2045         do, we now pass a KeyData subclass instead.
2046         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
2047         signatures will be.
2048
2049         * crypto/CryptoKeyData.h: Added.
2050         (WebCore::CryptoKeyData::ENUM_CLASS):
2051         (WebCore::CryptoKeyData::CryptoKeyData):
2052         (WebCore::CryptoKeyData::~CryptoKeyData):
2053         (WebCore::CryptoKeyData::format):
2054         A base class for passing key material to algorithms. Currently, only one type is
2055         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
2056         complicated, and secret/public ones are different too.
2057
2058         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
2059         confusingly floating around, and this was only needed in one file for parsing.
2060
2061         * crypto/CryptoKeySerialization.h: Added.
2062         Base class for handling raw/pkcs8/spki/jwk keys.
2063
2064         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2065         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2066         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2067         Updated to use CryptoKeyData.
2068
2069         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
2070         (WebCore::CryptoAlgorithmHMAC::importKey):
2071         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2072         Updated to use CryptoKeyData.
2073
2074         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
2075         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
2076         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
2077         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
2078         (WebCore::asCryptoKeyDataOctetSequence):
2079         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
2080         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
2081         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
2082         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
2083         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
2084         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
2085         (WebCore::CryptoKeySerializationRaw::keyData):
2086         * crypto/keys/CryptoKeySerializationRaw.h: Added.
2087         Much code to pass around a Vector<char>.
2088
2089 2013-11-08  Mark Lam  <mark.lam@apple.com>
2090
2091         Move breakpoint (and exception break) functionality into JSC::Debugger.
2092         https://bugs.webkit.org/show_bug.cgi?id=121796.
2093
2094         Reviewed by Geoffrey Garen.
2095
2096         No new tests.
2097
2098         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
2099           now numeric tokens.
2100
2101         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
2102           record. Previously, this info is tracked in the ScriptBreakpoint record
2103           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
2104           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
2105              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
2106           in a list keyed on the corresponding BreakpointID.
2107              The ScriptBreakpoint record is now only used as a means of passing
2108           breakpoint paramaters to the ScriptDebugServer.
2109
2110         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
2111           It always goes through the DebuggerCallFrame.
2112
2113         * GNUmakefile.list.am:
2114         * WebCore.vcxproj/WebCore.vcxproj:
2115         * WebCore.vcxproj/WebCore.vcxproj.filters:
2116         * WebCore.xcodeproj/project.pbxproj:
2117         * bindings/js/BreakpointID.h: Added.
2118         * bindings/js/ScriptDebugServer.cpp:
2119         (WebCore::ScriptDebugServer::ScriptDebugServer):
2120         (WebCore::ScriptDebugServer::setBreakpoint):
2121         (WebCore::ScriptDebugServer::removeBreakpoint):
2122         (WebCore::ScriptDebugServer::clearBreakpoints):
2123         (WebCore::ScriptDebugServer::dispatchDidPause):
2124         (WebCore::ScriptDebugServer::dispatchDidContinue):
2125         (WebCore::ScriptDebugServer::dispatchDidParseSource):
2126         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
2127         (WebCore::ScriptDebugServer::needPauseHandling):
2128         (WebCore::ScriptDebugServer::handleBreakpointHit):
2129         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
2130         (WebCore::ScriptDebugServer::handlePause):
2131         * bindings/js/ScriptDebugServer.h:
2132         * bindings/js/SourceID.h: Added.
2133         * bindings/js/WorkerScriptDebugServer.cpp:
2134         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2135         * bindings/js/WorkerScriptDebugServer.h:
2136         * inspector/InspectorDebuggerAgent.cpp:
2137         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
2138         (WebCore::parseLocation):
2139         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2140         (WebCore::InspectorDebuggerAgent::continueToLocation):
2141         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2142         (WebCore::InspectorDebuggerAgent::searchInContent):
2143         (WebCore::InspectorDebuggerAgent::getScriptSource):
2144         (WebCore::InspectorDebuggerAgent::didParseSource):
2145         (WebCore::InspectorDebuggerAgent::didPause):
2146         (WebCore::InspectorDebuggerAgent::clear):
2147         * inspector/InspectorDebuggerAgent.h:
2148         * inspector/ScriptDebugListener.h:
2149
2150 2013-11-08  László Langó  <lango@inf.u-szeged.hu>
2151
2152         InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
2153         https://bugs.webkit.org/show_bug.cgi?id=114316
2154
2155         Reviewed by Timothy Hatcher.
2156
2157         InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number, 
2158         but it should also include a column number. It looks like ultimately the line number comes from
2159         JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
2160         The column number would be needed by the Web Inspector to jump to the proper place in source code 
2161         to show where the XHR originated from.
2162
2163         * bindings/js/JSXMLHttpRequestCustom.cpp:
2164         (WebCore::SendFunctor::SendFunctor):
2165         (WebCore::SendFunctor::column):
2166         (WebCore::SendFunctor::operator()):
2167         (WebCore::JSXMLHttpRequest::send):
2168         * inspector/InspectorConsoleAgent.cpp:
2169         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2170         * inspector/InspectorConsoleAgent.h:
2171         * inspector/InspectorInstrumentation.cpp:
2172         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
2173         * inspector/InspectorInstrumentation.h:
2174         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2175         * xml/XMLHttpRequest.cpp:
2176         (WebCore::XMLHttpRequest::XMLHttpRequest):
2177         (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
2178         (WebCore::XMLHttpRequest::didFinishLoading):
2179         * xml/XMLHttpRequest.h:
2180
2181 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
2182
2183         Left sidebar on cubic-bezier.com flickers
2184         https://bugs.webkit.org/show_bug.cgi?id=123128
2185
2186         Reviewed by Dean Jackson.
2187         
2188         The logic that determined whether position:fixed elements outside the viewport
2189         should be composited was incorrect if the fixed element also had a transform.
2190         
2191         layer.calculateLayerBounds() only takes into account painted transforms (since they
2192         affect layer bounds). So we need to compute the bounds relative to the layer
2193         itself, then use localToContainerQuad() to map them to document coordinates,
2194         but only to the RenderView so that we don't hit the page scale transform.
2195
2196         Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
2197                compositing/layer-creation/fixed-position-transformed-outside-view.html
2198
2199         * rendering/RenderLayerCompositor.cpp:
2200         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2201
2202 2013-11-08  Martin Robinson  <mrobinson@igalia.com>
2203
2204         [MathML] Center of stretched curly bracket not always vertically centered
2205         https://bugs.webkit.org/show_bug.cgi?id=123715
2206
2207         Reviewed by Brent Fulgham.
2208
2209         * rendering/mathml/RenderMathMLOperator.cpp:
2210         (WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Update an assertion and
2211         handle the case where two glyph pieces abut.
2212         (WebCore::RenderMathMLOperator::paint): Do not offset the center glyph by y().
2213
2214 2013-10-30  Jer Noble  <jer.noble@apple.com>
2215
2216         [MSE] Bring SourceBuffer.append up to the most recent spec.
2217         https://bugs.webkit.org/show_bug.cgi?id=123377
2218
2219         Reviewed by Eric Carlson.
2220
2221         Test: media/media-source/media-source-append-failed.html
2222
2223         Bring the MediaSource append() implementation up to the current spec.
2224
2225         * Modules/mediasource/SourceBuffer.cpp:
2226         (WebCore::SourceBuffer::appendBufferInternal):
2227         (WebCore::SourceBuffer::appendBufferTimerFired):
2228         * platform/graphics/SourceBufferPrivate.h:
2229         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2230         (WebCore::MockSourceBufferPrivate::append):
2231         (WebCore::MockSourceBufferPrivate::evictCodedFrames):
2232         (WebCore::MockSourceBufferPrivate::isFull):
2233         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2234
2235 2013-11-07  Jer Noble  <jer.noble@apple.com>
2236
2237         [Mac] Crash at com.apple.WebCore: WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange + 26
2238         https://bugs.webkit.org/show_bug.cgi?id=124031
2239
2240         Reviewed by Eric Carlson.
2241
2242         WTF::bind() causes errors when given a bare id pointer as a parameter,
2243         when that parameter is casted to a specific NS type pointer (in this
2244         case, a NSArray*) in order to pass it as a parameter to the bound
2245         function.
2246
2247         Instead of passing around bare id pointers, wrap them in RetainPtr<>
2248         objects before passing them to WTF::bind().
2249
2250         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2252         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
2253         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
2254         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2255         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2256
2257 2013-11-08  Antti Koivisto  <antti@apple.com>
2258
2259         Templated LChar/UChar paths for simple line layout
2260         https://bugs.webkit.org/show_bug.cgi?id=124035
2261
2262         Reviewed by Andreas Kling.
2263
2264         * rendering/SimpleLineLayout.cpp:
2265         (WebCore::SimpleLineLayout::canUseForText):
2266         (WebCore::SimpleLineLayout::canUseFor):
2267         
2268             Use a templated function to check for illegal characters.
2269
2270         (WebCore::SimpleLineLayout::skipWhitespaces):
2271         
2272             Make a template function.
2273
2274         (WebCore::SimpleLineLayout::textWidth):
2275         
2276             Make a template function plus some argument changes.
2277
2278         (WebCore::SimpleLineLayout::createTextRuns):
2279         
2280             Template function for creating runs while operating with either LChars or UChar.
2281             Also simplified line breaking and text width measuring logic.
2282
2283         (WebCore::SimpleLineLayout::create):
2284         
2285             Pick the template.
2286
2287         * rendering/break_lines.cpp:
2288         * rendering/break_lines.h:
2289         
2290             Move the implementation to the header (except for the table) so we can use the template
2291             versions directly.
2292
2293         (WebCore::isBreakableSpace):
2294         (WebCore::shouldBreakAfter):
2295         (WebCore::needsLineBreakIterator):
2296         (WebCore::nextBreakablePosition):
2297         (WebCore::nextBreakablePositionIgnoringNBSP):
2298
2299 2013-11-08  Mario Sanchez Prada  <mario.prada@samsung.com>
2300
2301         AX: [ATK] <span> elements exposed through ATK when not needed
2302         https://bugs.webkit.org/show_bug.cgi?id=123885
2303
2304         Reviewed by Chris Fleizach.
2305
2306         As per SVN r158195, the way it's decided whether <span> elements
2307         should be ignored or not has slightly changed, causing that the
2308         GTK/EFL ports expose them in cases that they should be ignored,
2309         such as for text elements that neither are focusable (e.g. by
2310         explicitly setting tabindex) nor have a meaningful accessible name
2311         suggesting they should be exposed.
2312
2313         As a result, the flattening that ATK based ports normally do for
2314         this kind of elements (by folding them into their parents) do not
2315         work correctly anymore, making two tests to fail:
2316
2317             platform/gtk/accessibility/spans-paragraphs-and-divs.html
2318             platform/gtk/accessibility/spans.html
2319
2320         This patch encapsulates the part of the logic that affects this in
2321         the computeAccessibilityIsIgnored() method, placing it in a
2322         new method of AccessibilityObject that we can call from ATK's
2323         accessibilityPlatformIncludesObject() to ensure we hide those
2324         <span> elements when they don't fulfill those requirements.
2325
2326         * accessibility/AccessibilityObject.cpp:
2327         (WebCore::AccessibilityObject::hasAttributesRequiredForInclusion):
2328         New virtual method encapsulating part of the logic from the function
2329         that computes whether accessibility should be ignored or not.
2330         * accessibility/AccessibilityObject.h:
2331
2332         * accessibility/AccessibilityNodeObject.cpp:
2333         (WebCore::AccessibilityNodeObject::hasAttributesRequiredForInclusion):
2334         Override of the new method adding additional checks, as extracted from
2335         the original bits in computeAccessibilityIsIgnored().
2336         * accessibility/AccessibilityNodeObject.h:
2337
2338         * accessibility/AccessibilityRenderObject.cpp:
2339         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2340         Use the newly added function where we had the original code before.
2341
2342         * accessibility/atk/AccessibilityObjectAtk.cpp:
2343         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2344         Make sure <span> elements are ignored if they are not focusable
2345         and they don't have a meaningful accessible name.
2346
2347 2013-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2348
2349         [GTK] Add missing symbols to WebKitDOMEventTarget.symbols
2350         https://bugs.webkit.org/show_bug.cgi?id=123990
2351
2352         Reviewed by Philippe Normand.
2353
2354         Add webkit_dom_event_target_add_event_listener_with_closure and
2355         webkit_dom_event_target_remove_event_listener_with_closure to the
2356         symbols files.
2357
2358         * bindings/gobject/WebKitDOMEventTarget.symbols:
2359         * bindings/gobject/webkitdom.symbols:
2360
2361 2013-11-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2362
2363         [GTK] Use deprecation guards around deprecated API in GObject DOM bindings
2364         https://bugs.webkit.org/show_bug.cgi?id=123899
2365
2366         Reviewed by Martin Robinson.
2367
2368         Do not include deprecated API when compiling with
2369         WEBKIT_DISABLE_DEPRECATED option.
2370
2371         * bindings/scripts/CodeGeneratorGObject.pm:
2372         (GenerateFunction):
2373         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
2374         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2375
2376 2013-11-07  Brady Eidson  <beidson@apple.com>
2377
2378         Enhance SQL journal_mode setting code to be less likely to log an error.
2379         <rdar://problem/15418577> and https://bugs.webkit.org/show_bug.cgi?id=124018
2380
2381         Reviewed by Anders Carlsson.
2382
2383         Even though the docs says SQLITE_ROW will always be returned, apparently SQLITE_OK is sometimes returned.
2384         Change the code to handle that.
2385
2386         * platform/sql/SQLiteDatabase.cpp:
2387         (WebCore::SQLiteDatabase::open): Save the statement result value, and accept SQLITE_OK as a non-error condition.
2388
2389 2013-11-07  Brady Eidson  <beidson@apple.com>
2390
2391         Update an out-dated ASSERT in IconDatabase code.
2392         <rdar://problem/15171118> and https://bugs.webkit.org/show_bug.cgi?id=124030.
2393
2394         Reviewed by Andreas Kling.
2395
2396         With the asynchronous interfaces that have been added and the support for WK2 that has been added, 
2397         this ASSERT can incorrectly fire if an icon is asked for before database cleanup is allowed.
2398
2399         * loader/icon/IconDatabase.cpp:
2400         (WebCore::IconDatabase::synchronousIconForPageURL): Update an invalid ASSERT.
2401
2402 2013-11-07  Andreas Kling  <akling@apple.com>
2403
2404         RenderSVGResource helpers should take RenderStyle by const reference.
2405         <https://webkit.org/b/124029>
2406
2407         Take const RenderStyle& instead of RenderStyle* in a few more places
2408         so we can get rid of some ampersands and assertions.
2409
2410         Reviewed by Anders Carlsson.
2411
2412 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2413
2414         [AX] Generate toAccessibilityTableRow|Column|Cell to detect bad type casts
2415         https://bugs.webkit.org/show_bug.cgi?id=123984
2416
2417         Reviewed by Mario Sanchez Prada.
2418
2419         As a step to let static_cast<> use TYPE_CASTS_BASE, AccessibilityTableRow|Column|Cell use
2420         ACCESSIBILITY_OBJECT_TYPE_CASTS which can support more helper functions rather than manual
2421         static_cast<>. This change will help to detect bad type casts further.
2422
2423         No new tests, no behavior changes.
2424
2425         * accessibility/AccessibilityARIAGrid.cpp:
2426         (WebCore::AccessibilityARIAGrid::addTableCellChild):
2427         (WebCore::AccessibilityARIAGrid::addChildren):
2428         * accessibility/AccessibilityARIAGridCell.cpp:
2429         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2430         * accessibility/AccessibilityTable.cpp:
2431         (WebCore::AccessibilityTable::addChildren):
2432         (WebCore::AccessibilityTable::rowHeaders):
2433         (WebCore::AccessibilityTable::columnHeaders):
2434         (WebCore::AccessibilityTable::cellForColumnAndRow):
2435         * accessibility/AccessibilityTableCell.h:
2436         * accessibility/AccessibilityTableColumn.h:
2437         * accessibility/AccessibilityTableRow.cpp:
2438         (WebCore::AccessibilityTableRow::headerObject):
2439         * accessibility/AccessibilityTableRow.h:
2440         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2441         (cellAtIndex):
2442         (webkitAccessibleTableGetColumnHeader):
2443         (webkitAccessibleTableGetRowHeader):
2444         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2445         (-[WebAccessibilityObjectWrapper tableCellParent]):
2446         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2447         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2448
2449 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2450
2451         REGRESSION (r154375): Image is oriented incorrectly
2452         https://bugs.webkit.org/show_bug.cgi?id=123831
2453
2454         Reviewed by Antonio Gomes.
2455
2456         r154375 made that shouldRespectImageOrientation() isn't used by drawImage().
2457         It causes an image isn't oriented correctly. This patch sets shouldRespectImageOrientation()
2458         value by default.
2459
2460         * rendering/RenderImage.cpp:
2461         (WebCore::RenderImage::paintReplaced):
2462         (WebCore::RenderImage::paintIntoRect):
2463
2464 2013-11-07  Hans Muller  <hmuller@adobe.com>
2465
2466         [CSS Shapes] Image shape-outside with vertical gaps is handled incorrectly
2467         https://bugs.webkit.org/show_bug.cgi?id=123934
2468
2469         Reviewed by Andreas Kling.
2470
2471         RasterShapeIntervals::getExcludedIntervals() was returning an empty
2472         list when the line overlapped any vertical gap in the image. This short-circuit
2473         had been mistakenly copied from getIncludedIntervals(), where it makes sense.
2474
2475         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-vgap.html
2476
2477         * rendering/shapes/RasterShape.cpp:
2478         (WebCore::RasterShapeIntervals::getExcludedIntervals):
2479
2480 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2481
2482         Make contents layer borders more visible
2483         https://bugs.webkit.org/show_bug.cgi?id=124025
2484
2485         Reviewed by Tim Horton.
2486
2487         Layer borders for contents layers are impossible to see when the
2488         contentsLayer has the same bounds as its parent; make the contents
2489         layer border 4px thick to make it more visible.
2490
2491         * platform/graphics/ca/GraphicsLayerCA.cpp:
2492         (WebCore::GraphicsLayerCA::setupContentsLayer):
2493
2494 2013-11-07  Andreas Kling  <akling@apple.com>
2495
2496         InlineFlowBox always has a RenderBoxModelObject, take advantage.
2497         <https://webkit.org/b/124024>
2498
2499         Since InlineFlowBox already has the branch-less renderer() returning
2500         a RenderBoxModelObject&, avoid using InlineBox::boxModelObject()
2501         wherever we have a tightly-typed box. One branch disappears from
2502         every call site.
2503
2504         Deleted boxModelObject() on InlineFlowBox to prevent new code from
2505         calling the less efficient function.
2506
2507         Reviewed by Anders Carlsson.
2508
2509 2013-11-07  Andreas Kling  <akling@apple.com>
2510
2511         CTTE: Scrolling tree nodes should always have a ScrollingTree&.
2512         <https://webkit.org/b/124022>
2513
2514         Let ScrollingTreeNode and subclasses store the backpointer to the
2515         tree as a ScrollingTree& reference.
2516
2517         Reviewed by Anders Carlsson.
2518
2519 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2520
2521         Lots of layers get solid color but transparent contents layers now
2522         https://bugs.webkit.org/show_bug.cgi?id=123537
2523
2524         Reviewed by Tim Horton.
2525         
2526         We call rendererBackgroundColor() to determine the layer's background color,
2527         but on most elements this returns the transparent color (a valid color).
2528         This caused us to allocate a contentsLayer, and use the transparent color as its
2529         backgroundColor, which was wasteful.
2530         
2531         Fix by only making a background-color layer if the color is not transparent (zero alpha).
2532         
2533         Also avoid making a new contents layer on every color change, and make sure that
2534         we don't do implicit animations for backgroundColor, and some other properties
2535         that were omitted by mistake.
2536
2537         Layer tree dumps don't dump content layers, so no way to test easily.
2538
2539         * platform/graphics/ca/GraphicsLayerCA.cpp:
2540         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
2541         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2542         (nullActionsDictionary):
2543
2544 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2545
2546         DOMTokenList::add can add duplicated values if arguments had duplicated values
2547         https://bugs.webkit.org/show_bug.cgi?id=123962
2548
2549         Reviewed by Benjamin Poulain.
2550
2551         Merge https://chromium.googlesource.com/chromium/blink/+/bd3822ad4ae3fc5d8f89f433a7bf04f697334305
2552
2553         In case we do element.classList.add('a', 'a') we need to ensure that we do not add the same token twice.
2554         See http://dom.spec.whatwg.org/#dom-domtokenlist-add
2555
2556         * html/DOMTokenList.cpp:
2557         (WebCore::DOMTokenList::add): Make sure filtered tokens are unique among themselves.
2558
2559 2013-11-07  Eric Carlson  <eric.carlson@apple.com>
2560
2561         Remove npr.org specific hack in HTMLMediaElement
2562         https://bugs.webkit.org/show_bug.cgi?id=123859
2563
2564         Reviewed by Jer Noble.
2565
2566         Remove the site specific hack added in r57820, it is no longer necessary.
2567
2568         * html/HTMLMediaElement.cpp:
2569         (WebCore::HTMLMediaElement::HTMLMediaElement): Remove m_dispatchingCanPlayEvent.
2570         (HTMLMediaElement::play): Don't special case npr.org.
2571         * html/HTMLMediaElement.h:
2572
2573 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2574
2575         Attempt to fix the 32-bit build. Virtual thunks seem to have different
2576         symbol names between 32- and 64-bit.
2577         
2578         * WebCore.exp.in:
2579
2580 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2581
2582         Crash in HTMLMediaElement::contextDestroyed
2583         https://bugs.webkit.org/show_bug.cgi?id=123963
2584
2585         Reviewed by Eric Carlson.
2586
2587         Merge https://chromium.googlesource.com/chromium/blink/+/177999cdb34b707465670f0feff723922939f278
2588
2589         * html/HTMLMediaElement.cpp:
2590         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2591
2592 2013-11-07  Jer Noble  <jer.noble@apple.com>
2593
2594         [Mac] Crash at com.apple.WebCore: -[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:] + 2084 
2595         https://bugs.webkit.org/show_bug.cgi?id=124012
2596
2597         Reviewed by Eric Carlson.
2598
2599         The value of the 'duration' key is a NSConcreteValue wrapping a CMTime, not a NSNumber.
2600
2601         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2602         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2603
2604 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
2605
2606         Crash when submitting form in a document with null encoding
2607         https://bugs.webkit.org/show_bug.cgi?id=123975
2608
2609         Reviewed by Alexey Proskuryakov.
2610
2611         Merge https://chromium.googlesource.com/chromium/blink/+/bba01a7fff09e3053ada96ababac2a6e4261fe5f
2612         
2613         The CString object which is passed to normalizeLineEndingsToCRLF() can be
2614         a null string. It is created in FormDataList::appendString(), and it
2615         produces a null CString if FormDataList::m_encoding is a null encoding.
2616
2617         Test: fast/forms/form-submit-in-image-document.html
2618
2619         * platform/text/LineEnding.cpp:
2620         (internalNormalizeLineEndingsToCRLF):
2621
2622 2013-11-07  Anders Carlsson  <andersca@apple.com>
2623
2624         Use std::function for all policy continuation functions
2625         https://bugs.webkit.org/show_bug.cgi?id=124011
2626
2627         Reviewed by Sam Weinig.
2628
2629         * loader/DocumentLoader.cpp:
2630         (WebCore::DocumentLoader::willSendRequest):
2631         (WebCore::DocumentLoader::responseReceived):
2632         * loader/DocumentLoader.h:
2633         * loader/FrameLoader.cpp:
2634         (WebCore::FrameLoader::loadURL):
2635         (WebCore::FrameLoader::load):
2636         (WebCore::FrameLoader::loadWithDocumentLoader):
2637         (WebCore::FrameLoader::loadPostRequest):
2638         * loader/PolicyCallback.cpp:
2639         (WebCore::PolicyCallback::clear):
2640         (WebCore::PolicyCallback::set):
2641         (WebCore::PolicyCallback::call):
2642         (WebCore::PolicyCallback::clearRequest):
2643         (WebCore::PolicyCallback::cancel):
2644         * loader/PolicyCallback.h:
2645         * loader/PolicyChecker.cpp:
2646         (WebCore::PolicyChecker::checkNavigationPolicy):
2647         (WebCore::PolicyChecker::checkNewWindowPolicy):
2648         (WebCore::PolicyChecker::checkContentPolicy):
2649         * loader/PolicyChecker.h:
2650
2651 2013-11-07  Brady Eidson  <beidson@apple.com>
2652
2653         Use SQLite journal mode WAL (WriteAheadLogging)
2654         https://bugs.webkit.org/show_bug.cgi?id=124009
2655
2656         Reviewed by Anders Carlsson.
2657
2658         WriteAheadLogging journalling is better than the traditional rollback model.
2659
2660         * platform/sql/SQLiteDatabase.cpp:
2661         (WebCore::SQLiteDatabase::open): Use a PRAGMA to set journal_mode to WAL.
2662
2663 2013-11-07  Mark Lam  <mark.lam@apple.com>
2664
2665         Cosmetic: rename xxxId to xxxID for ScriptId, SourceId, and BreakpointId.
2666         https://bugs.webkit.org/show_bug.cgi?id=123945.
2667
2668         Reviewed by Geoffrey Garen.
2669
2670         No new tests.
2671
2672         * bindings/js/JSInjectedScriptHostCustom.cpp:
2673         (WebCore::JSInjectedScriptHost::functionDetails):
2674         * bindings/js/JavaScriptCallFrame.h:
2675         (WebCore::JavaScriptCallFrame::sourceID):
2676         * bindings/js/ScriptDebugServer.cpp:
2677         (WebCore::ScriptDebugServer::ScriptDebugServer):
2678         (WebCore::ScriptDebugServer::setBreakpoint):
2679         (WebCore::ScriptDebugServer::removeBreakpoint):
2680         (WebCore::ScriptDebugServer::hasBreakpoint):
2681         (WebCore::ScriptDebugServer::clearBreakpoints):
2682         (WebCore::ScriptDebugServer::updateCallFrame):
2683         (WebCore::ScriptDebugServer::pauseIfNeeded):
2684         * bindings/js/ScriptDebugServer.h:
2685         * inspector/InspectorConsoleAgent.cpp:
2686         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2687         * inspector/InspectorConsoleAgent.h:
2688         * inspector/InspectorConsoleInstrumentation.h:
2689         (WebCore::InspectorInstrumentation::addMessageToConsole):
2690         * inspector/InspectorDOMAgent.cpp:
2691         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2692         * inspector/InspectorDebuggerAgent.cpp:
2693         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2694         (WebCore::parseLocation):
2695         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2696         (WebCore::InspectorDebuggerAgent::removeBreakpoint):
2697         (WebCore::InspectorDebuggerAgent::continueToLocation):
2698         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2699         (WebCore::InspectorDebuggerAgent::searchInContent):
2700         (WebCore::InspectorDebuggerAgent::setScriptSource):
2701         (WebCore::InspectorDebuggerAgent::getScriptSource):
2702         (WebCore::InspectorDebuggerAgent::compileScript):
2703         (WebCore::InspectorDebuggerAgent::runScript):
2704         (WebCore::InspectorDebuggerAgent::didParseSource):
2705         (WebCore::InspectorDebuggerAgent::didPause):
2706         (WebCore::InspectorDebuggerAgent::clear):
2707         (WebCore::InspectorDebuggerAgent::reset):
2708         * inspector/InspectorDebuggerAgent.h:
2709         * inspector/InspectorInstrumentation.cpp:
2710         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2711         * inspector/InspectorInstrumentation.h:
2712         * inspector/ScriptDebugListener.h:
2713
2714 2013-11-07  Cidorvan Leite  <cidorvan.leite@openbossa.org>
2715
2716         Avoid invalid cairo matrix when drawing surfaces too small
2717         https://bugs.webkit.org/show_bug.cgi?id=123810
2718
2719         Drawing surfaces too small makes inverse matrix with values too big,
2720         when this happen, cairo context is not valid anymore and it stops to draw anything.
2721
2722         Reviewed by Martin Robinson.
2723
2724         Test: fast/canvas/drawImage-with-small-values.html
2725
2726         * platform/graphics/cairo/PlatformContextCairo.cpp:
2727         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2728
2729 2013-11-07  Antti Koivisto  <antti@apple.com>
2730
2731         Simple line layout crashes with SVG fonts
2732         https://bugs.webkit.org/show_bug.cgi?id=124002
2733
2734         Reviewed by Simon Fraser.
2735         
2736         Don't use simple line layout for flows using SVG fonts. They crash if kerning is enabled.
2737
2738         Test: fast/text/svg-font-simple-line-crash.html
2739
2740         * platform/graphics/Font.h:
2741         (WebCore::Font::isSVGFont):
2742         
2743             Add isSVGFont() so callers don't need to go via primaryFont().
2744
2745         * rendering/InlineTextBox.cpp:
2746         (WebCore::InlineTextBox::constructTextRun):
2747         * rendering/RenderBlock.cpp:
2748         (WebCore::constructTextRunInternal):
2749         * rendering/SimpleLineLayout.cpp:
2750         (WebCore::SimpleLineLayout::canUseFor):
2751         
2752             Disallow SVG fonts.
2753
2754         * rendering/svg/SVGInlineTextBox.cpp:
2755         (WebCore::SVGInlineTextBox::constructTextRun):
2756         * rendering/svg/SVGTextMetrics.cpp:
2757         (WebCore::SVGTextMetrics::constructTextRun):
2758         (WebCore::SVGTextMetrics::SVGTextMetrics):
2759         * rendering/svg/SVGTextRunRenderingContext.h:
2760         
2761             Get rid of the abstract textRunNeedsRenderingContext in favor of just testing isSVGFont().
2762
2763 2013-11-07  Simon Fraser  <simon.fraser@apple.com>
2764
2765         Allow customization of the contentsScale of TileController tiles
2766         https://bugs.webkit.org/show_bug.cgi?id=124004
2767
2768         Reviewed by Tim Horton.
2769
2770         On some platorms, zooming out on pages with TiledBacking compositing
2771         layers can cause very high memory use, because the TiledBacking retains
2772         the original page scale while the zoom is in flight, but can be asked
2773         to cover a large area.
2774         
2775         Make it possible to reduce memory use in this case by allowing RenderLayerCompositor
2776         to provide an additional scale factor for newly created tiles. Platforms can
2777         then customize this to create low-res tiles when necessary.
2778
2779         * WebCore.exp.in:
2780         * platform/graphics/GraphicsLayerClient.h:
2781         (WebCore::GraphicsLayerClient::contentsScaleMultiplierForNewTiles):
2782         * platform/graphics/ca/GraphicsLayerCA.cpp:
2783         (WebCore::GraphicsLayerCA::platformCALayerContentsScaleMultiplierForNewTiles):
2784         * platform/graphics/ca/GraphicsLayerCA.h:
2785         * platform/graphics/ca/PlatformCALayerClient.h:
2786         (WebCore::PlatformCALayerClient::platformCALayerContentsScaleMultiplierForNewTiles):
2787         * platform/graphics/ca/mac/TileController.h:
2788         * platform/graphics/ca/mac/TileController.mm:
2789         (WebCore::TileController::TileController):
2790         (WebCore::TileController::setScale):
2791         (WebCore::TileController::createTileLayer):
2792         * rendering/RenderLayerBacking.cpp:
2793         (WebCore::RenderLayerBacking::contentsScaleMultiplierForNewTiles):
2794         * rendering/RenderLayerBacking.h:
2795         * rendering/RenderLayerCompositor.cpp:
2796         (WebCore::RenderLayerCompositor::contentsScaleMultiplierForNewTiles):
2797         * rendering/RenderLayerCompositor.h:
2798
2799 2013-11-07  Jer Noble  <jer.noble@apple.com>
2800
2801         Unreviewed Win build fix after r158855; wrap shapeInfoForFloat() in an ENABLE(CSS_SHAPES) guard.
2802
2803         * rendering/FloatingObjects.cpp:
2804
2805 2013-11-07  Bem Jones-Bey  <bjonesbe@adobe.com>
2806
2807         Refactor logical left/right offset for line methods
2808         https://bugs.webkit.org/show_bug.cgi?id=123898
2809
2810         Reviewed by David Hyatt.
2811
2812         Simplify the logical left/right offset for line methods and their
2813         implementation, including the ComputeFloatOffsetAdapter. This also
2814         reduces the number of line offset methods in RenderBlock.
2815
2816         No new tests, no behavior change.
2817
2818         * rendering/FloatingObjects.cpp:
2819         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
2820         (WebCore::ComputeFloatOffsetAdapter::offset): Add a method to return
2821             the offset instead of using a confusing out parameter.
2822         (WebCore::::shapeOffset): Method to return the offset modified by the
2823             shape delta. Moving the computation to this method allowed for
2824             simplification of the users of ComputeFloatOffsetAdapter.
2825         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat): Added this
2826             method so that ShapeOutsideFloatOffsetMode isn't needed. Returns the
2827             offset based on the float margin box.
2828         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat): Ditto.
2829         (WebCore::FloatingObjects::logicalLeftOffset): This now only returns
2830             the offset based on the shape's contour.
2831         (WebCore::FloatingObjects::logicalRightOffset): Ditto.
2832         (WebCore::::heightRemaining): Rename to properly follow the getter
2833             naming convention.
2834         * rendering/FloatingObjects.h:
2835         * rendering/RenderBlock.h:
2836         (WebCore::RenderBlock::logicalRightOffsetForLine): Update to remove
2837             use of ShapeOutsideFloatOffsetMode and heightRemaining.
2838         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
2839         (WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
2840         (WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
2841         * rendering/RenderBlockFlow.cpp:
2842         (WebCore::RenderBlockFlow::logicalLeftOffsetForPositioningFloat):
2843             Positioning a float is the only case where the float margin box
2844             should be used, and also the only case where heightRemaining is
2845             needed. This handles that case.
2846         (WebCore::RenderBlockFlow::logicalRightOffsetForPositioningFloat):
2847             Ditto.
2848         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat): Update to
2849             use logical(Left|Right)OffsetForPositioningFloatOnLine.
2850         (WebCore::RenderBlockFlow::logicalLeftFloatOffsetForLine): Update to
2851             remove use for ShapeOutsideFloatOffsetMode and heightRemaining.
2852         (WebCore::RenderBlockFlow::logicalRightFloatOffsetForLine): Ditto.
2853         * rendering/RenderBlockFlow.h:
2854
2855 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
2856
2857         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
2858         https://bugs.webkit.org/show_bug.cgi?id=123577
2859
2860         Reviewed by Timothy Hatcher.
2861
2862         Test: inspector-protocol/model/content-flow-content-removal.html
2863
2864         Do not send unregister events for the content nodes of a flow when the element is not part of the DOM
2865         anymore. We already send an unbind event, so the inspector is already notified that the node was removed.
2866
2867         * inspector/InspectorCSSAgent.cpp:
2868         (WebCore::InspectorCSSAgent::didUnregisterNamedFlowContentElement):
2869
2870 2013-10-30  Jer Noble  <jer.noble@apple.com>
2871
2872         [MSE] Add mock MediaSource classes for testing.
2873         https://bugs.webkit.org/show_bug.cgi?id=123322
2874
2875         Reviewed by Eric Carlson.
2876
2877         Tests: media/media-source/media-source-addsourcebuffer.html
2878                media/media-source/media-source-append-buffer.html
2879                media/media-source/media-source-canplaythrough.html
2880                media/media-source/media-source-closed.html
2881                media/media-source/media-source-play.html
2882                media/media-source/media-source-track-enabled.html
2883                media/media-source/media-source-tracks.html
2884
2885
2886         Add mock implementation of platform MediaSource classes, allowing ports to test the
2887         MediaSource API without having a platform implementation.
2888
2889         The MockMediaSource will support a byteformat defined in MockBox.h: a simple box-style media
2890         format with an initialization segment containing a number of tracks, followed by a list of
2891         samples.
2892
2893         Add a means to insert a new media engine factory at runtime, so the internals object can add
2894         a MockMediaSourceMediaPlayer:
2895         * platform/graphics/MediaPlayer.cpp:
2896         (WebCore::MediaPlayerFactorySupport::callRegisterMediaEngine):
2897         * platform/graphics/MediaPlayer.h:
2898         * testing/Internals.cpp:
2899         (WebCore::Internals::initializeMockMediaSource):
2900         * testing/Internals.h:
2901         * testing/Internals.idl:
2902
2903         For non-media-source supporting media engines, fail immediately when asked to load a media
2904         source, so that the MockMediaSourceMediaPlayer will be instantiated as a fall-back:
2905         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2906         (WebCore::MediaPlayerPrivateAVFoundation::load):
2907         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2908         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2909         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
2910         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
2911         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2912         (WebCore::MediaPlayerPrivateQTKit::load):
2913         (WebCore::MediaPlayerPrivateQTKit::supportsType):
2914
2915         Add new files to the project:
2916         * WebCore.xcodeproj/project.pbxproj:
2917         * Source/WebCore/WebCore.exp.in:
2918
2919         Update the MediaSource implementation:
2920         * Modules/mediasource/MediaSource.cpp:
2921         (WebCore::MediaSource::monitorSourceBuffers): Add a link to the spec.
2922         * Modules/mediasource/SourceBuffer.cpp:
2923         (WebCore::SourceBuffer::buffered): Ditto.
2924         (WebCore::SourceBuffer::setTimestampOffset): Ditto.
2925         (WebCore::SourceBuffer::validateInitializationSegment): Ditto.
2926         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment): Ditto. Also,
2927             bring the implementation up to date with part of the spec.
2928         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): Remove "Predicate" from
2929             SampleIsRandomAccessPredicate.
2930
2931         Add utility classes to parse and represent the bytestream supported by the MockMediaSource:
2932         * platform/mock/mediasource/MockBox.cpp: Added.
2933         (WebCore::MockBox::MockBox):
2934         (WebCore::MockBox::peekType):
2935         (WebCore::MockBox::peekLength):
2936         (WebCore::MockTrackBox::MockTrackBox):
2937         (WebCore::MockTrackBox::type):
2938         (WebCore::MockInitializationBox::MockInitializationBox):
2939         (WebCore::MockInitializationBox::type):
2940         (WebCore::MockSampleBox::MockSampleBox):
2941         (WebCore::MockSampleBox::type):
2942         * platform/mock/mediasource/MockBox.h: Added.
2943         (WebCore::MockBox::length):
2944         (WebCore::MockBox::type):
2945         (WebCore::MockTrackBox::trackID):
2946         (WebCore::MockTrackBox::codec):
2947         (WebCore::MockTrackBox::kind):
2948         (WebCore::MockInitializationBox::duration):
2949         (WebCore::MockInitializationBox::tracks):
2950         (WebCore::MockSampleBox::presentationTimestamp):
2951         (WebCore::MockSampleBox::decodeTimestamp):
2952         (WebCore::MockSampleBox::duration):
2953         (WebCore::MockSampleBox::trackID):
2954         (WebCore::MockSampleBox::flags):
2955         (WebCore::MockSampleBox::isSync):
2956
2957         Add a MediaPlayerPrivate implementation which uses MockMediaSource:
2958         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Added.
2959         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
2960         (WebCore::MockMediaPlayerMediaSource::create):
2961         (WebCore::mimeTypeCache):
2962         (WebCore::MockMediaPlayerMediaSource::getSupportedTypes):
2963         (WebCore::MockMediaPlayerMediaSource::supportsType):
2964         (WebCore::MockMediaPlayerMediaSource::MockMediaPlayerMediaSource):
2965         (WebCore::MockMediaPlayerMediaSource::~MockMediaPlayerMediaSource):
2966         (WebCore::MockMediaPlayerMediaSource::load):
2967         (WebCore::MockMediaPlayerMediaSource::cancelLoad):
2968         (WebCore::MockMediaPlayerMediaSource::play):
2969         (WebCore::MockMediaPlayerMediaSource::pause):
2970         (WebCore::MockMediaPlayerMediaSource::naturalSize):
2971         (WebCore::MockMediaPlayerMediaSource::hasVideo):
2972         (WebCore::MockMediaPlayerMediaSource::hasAudio):
2973         (WebCore::MockMediaPlayerMediaSource::setVisible):
2974         (WebCore::MockMediaPlayerMediaSource::seeking):
2975         (WebCore::MockMediaPlayerMediaSource::paused):
2976         (WebCore::MockMediaPlayerMediaSource::networkState):
2977         (WebCore::MockMediaPlayerMediaSource::readyState):
2978         (WebCore::MockMediaPlayerMediaSource::buffered):
2979         (WebCore::MockMediaPlayerMediaSource::didLoadingProgress):
2980         (WebCore::MockMediaPlayerMediaSource::setSize):
2981         (WebCore::MockMediaPlayerMediaSource::paint):
2982         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
2983         (WebCore::MockMediaPlayerMediaSource::durationDouble):
2984         (WebCore::MockMediaPlayerMediaSource::seekDouble):
2985         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
2986         (WebCore::MockMediaPlayerMediaSource::updateDuration):
2987         (WebCore::MockMediaPlayerMediaSource::setReadyState):
2988         * platform/mock/mediasource/MockMediaPlayerMediaSource.h: Added.
2989
2990         Add a mock implementation of MediaSourcePrivate, which uses MockSourceBuffer:
2991         * platform/mock/mediasource/MockMediaSourcePrivate.cpp: Added.
2992         (WebCore::MockMediaSourcePrivate::create):
2993         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
2994         (WebCore::MockMediaSourcePrivate::~MockMediaSourcePrivate):
2995         (WebCore::MockMediaSourcePrivate::addSourceBuffer):
2996         (WebCore::MockMediaSourcePrivate::removeSourceBuffer):
2997         (WebCore::MockMediaSourcePrivate::duration):
2998         (WebCore::MockMediaSourcePrivate::setDuration):
2999         (WebCore::MockMediaSourcePrivate::markEndOfStream):
3000         (WebCore::MockMediaSourcePrivate::unmarkEndOfStream):
3001         (WebCore::MockMediaSourcePrivate::readyState):
3002         (WebCore::MockMediaSourcePrivate::setReadyState):
3003         (WebCore::MockMediaSourcePrivate::sourceBufferPrivateDidChangeActiveState):
3004         (WebCore::MockSourceBufferPrivateHasAudio):
3005         (WebCore::MockMediaSourcePrivate::hasAudio):
3006         (WebCore::MockSourceBufferPrivateHasVideo):
3007         (WebCore::MockMediaSourcePrivate::hasVideo):
3008         * platform/mock/mediasource/MockMediaSourcePrivate.h: Added.
3009         (WebCore::MockMediaSourcePrivate::activeSourceBuffers):
3010         (WebCore::MockMediaSourcePrivate::player):
3011
3012         Add a mock implementation of SourceBufferPrivate, which uses MockBoxes to parse the
3013         bytestream provided by SourceBuffer:
3014         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Added.
3015         (WebCore::MockMediaSample::create):
3016         (WebCore::MockMediaSample::~MockMediaSample):
3017         (WebCore::MockMediaSample::MockMediaSample):
3018         (WebCore::MockMediaSample::platformSample):
3019         (WebCore::MockMediaDescription::create):
3020         (WebCore::MockMediaDescription::~MockMediaDescription):
3021         (WebCore::MockMediaDescription::MockMediaDescription):
3022         (WebCore::MockSourceBufferPrivate::create):
3023         (WebCore::MockSourceBufferPrivate::MockSourceBufferPrivate):
3024         (WebCore::MockSourceBufferPrivate::~MockSourceBufferPrivate):
3025         (WebCore::MockSourceBufferPrivate::setClient):
3026         (WebCore::MockSourceBufferPrivate::append):
3027         (WebCore::MockSourceBufferPrivate::didReceiveInitializationSegment):
3028         (WebCore::MockSourceBufferPrivate::didReceiveSample):
3029         (WebCore::MockSourceBufferPrivate::abort):
3030         (WebCore::MockSourceBufferPrivate::removedFromMediaSource):
3031         (WebCore::MockSourceBufferPrivate::readyState):
3032         (WebCore::MockSourceBufferPrivate::setReadyState):
3033         (WebCore::MockSourceBufferPrivate::hasVideo):
3034         (WebCore::MockSourceBufferPrivate::hasAudio):
3035         * platform/mock/mediasource/MockSourceBufferPrivate.h: Added.
3036
3037         Create mock implementations of AudioTrackPrivate, VideoTrackPrivate, and TextTrackPrivate
3038         which wrap the MockTrackBox class:
3039         * platform/mock/mediasource/MockTracks.cpp: Added.
3040         * platform/mock/mediasource/MockTracks.h: Added.
3041         (WebCore::MockAudioTrackPrivate::create):
3042         (WebCore::MockAudioTrackPrivate::~MockAudioTrackPrivate):
3043         (WebCore::MockAudioTrackPrivate::id):
3044         (WebCore::MockAudioTrackPrivate::MockAudioTrackPrivate):
3045         (WebCore::MockTextTrackPrivate::create):
3046         (WebCore::MockTextTrackPrivate::~MockTextTrackPrivate):
3047         (WebCore::MockTextTrackPrivate::id):
3048         (WebCore::MockTextTrackPrivate::MockTextTrackPrivate):
3049         (WebCore::MockVideoTrackPrivate::create):
3050         (WebCore::MockVideoTrackPrivate::~MockVideoTrackPrivate):
3051         (WebCore::MockVideoTrackPrivate::id):
3052         (WebCore::MockVideoTrackPrivate::MockVideoTrackPrivate):
3053
3054 2013-11-07  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3055
3056         Changing MediaStreamDescriptor to MediaStreamPrivate
3057         https://bugs.webkit.org/show_bug.cgi?id=123935
3058
3059         Reviewed by Eric Carlson.
3060
3061         No new tests needed.
3062
3063         * CMakeLists.txt:
3064         * GNUmakefile.list.am:
3065         * Modules/mediastream/MediaStream.cpp:
3066         (WebCore::MediaStream::create):
3067         (WebCore::MediaStream::MediaStream):
3068         (WebCore::MediaStream::~MediaStream):
3069         (WebCore::MediaStream::ended):
3070         (WebCore::MediaStream::setEnded):
3071         (WebCore::MediaStream::addTrack):
3072         (WebCore::MediaStream::removeTrack):
3073         (WebCore::MediaStream::removeRemoteSource):
3074         * Modules/mediastream/MediaStream.h:
3075         * Modules/mediastream/MediaStreamRegistry.cpp:
3076         (WebCore::MediaStreamRegistry::registerURL):
3077         (WebCore::MediaStreamRegistry::unregisterURL):
3078         (WebCore::MediaStreamRegistry::lookupMediaStreamPrivate):
3079         * Modules/mediastream/MediaStreamRegistry.h:
3080         * Modules/mediastream/MediaStreamTrack.cpp:
3081         * Modules/mediastream/MediaStreamTrack.h:
3082         * Modules/mediastream/RTCPeerConnection.cpp:
3083         (WebCore::RTCPeerConnection::addStream):
3084         (WebCore::RTCPeerConnection::removeStream):
3085         (WebCore::RTCPeerConnection::didAddRemoteStream):
3086         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
3087         * Modules/mediastream/RTCPeerConnection.h:
3088         * Modules/mediastream/UserMediaRequest.cpp:
3089         (WebCore::UserMediaRequest::didCreateStream):
3090         (WebCore::UserMediaRequest::callSuccessHandler):
3091         * Modules/mediastream/UserMediaRequest.h:
3092         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3093         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
3094         * WebCore.xcodeproj/project.pbxproj:
3095         * html/HTMLMediaElement.cpp:
3096         (HTMLMediaElement::loadResource):
3097         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3098         (WebCore::toWebMediaStreamPrivate):
3099         (WebCore::MediaPlayerPrivate::lookupMediaStream):
3100         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
3101         * platform/mediastream/MediaStreamCenter.cpp:
3102         * platform/mediastream/MediaStreamCreationClient.h:
3103         * platform/mediastream/MediaStreamPrivate.cpp: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp.
3104         (WebCore::MediaStreamPrivate::create):
3105         (WebCore::MediaStreamPrivate::addSource):
3106         (WebCore::MediaStreamPrivate::removeSource):
3107         (WebCore::MediaStreamPrivate::addRemoteSource):
3108         (WebCore::MediaStreamPrivate::removeRemoteSource):
3109         (WebCore::MediaStreamPrivate::addRemoteTrack):
3110         (WebCore::MediaStreamPrivate::removeRemoteTrack):
3111         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
3112         (WebCore::MediaStreamPrivate::setEnded):
3113         (WebCore::MediaStreamPrivate::addTrack):
3114         (WebCore::MediaStreamPrivate::removeTrack):
3115         * platform/mediastream/MediaStreamPrivate.h: Renamed from Source/WebCore/platform/mediastream/MediaStreamDescriptor.h.
3116         (WebCore::MediaStreamPrivateClient::~MediaStreamPrivateClient):
3117         (WebCore::MediaStreamPrivate::~MediaStreamPrivate):
3118         (WebCore::MediaStreamPrivate::client):
3119         (WebCore::MediaStreamPrivate::setClient):
3120         (WebCore::MediaStreamPrivate::id):
3121         (WebCore::MediaStreamPrivate::numberOfAudioSources):
3122         (WebCore::MediaStreamPrivate::audioSources):
3123         (WebCore::MediaStreamPrivate::numberOfVideoSources):
3124         (WebCore::MediaStreamPrivate::videoSources):
3125         (WebCore::MediaStreamPrivate::numberOfAudioTracks):
3126         (WebCore::MediaStreamPrivate::audioTracks):
3127         (WebCore::MediaStreamPrivate::numberOfVideoTracks):
3128         (WebCore::MediaStreamPrivate::videoTracks):
3129         (WebCore::MediaStreamPrivate::ended):
3130         * platform/mediastream/MediaStreamSource.cpp:
3131         * platform/mediastream/MediaStreamSource.h:
3132         * platform/mediastream/RTCPeerConnectionHandler.h:
3133         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3134         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.cpp:
3135         * platform/mediastream/blackberry/MediaStreamCenterBlackBerry.h:
3136         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
3137         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
3138         * platform/mediastream/mac/MediaStreamCenterMac.cpp:
3139         (WebCore::MediaStreamCenterMac::createMediaStream):
3140         * platform/mock/MockMediaStreamCenter.cpp:
3141         (WebCore::MockMediaStreamCenter::createMediaStream):
3142         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
3143         (WebCore::RTCPeerConnectionHandlerMock::addStream):
3144         (WebCore::RTCPeerConnectionHandlerMock::removeStream):
3145         * platform/mock/RTCPeerConnectionHandlerMock.h:
3146
3147 2013-11-07  Denis Nomiyama  <d.nomiyama@samsung.com>
3148
3149         [GTK] Glyphs in vertical text tests are rotated 90 degrees clockwise
3150         https://bugs.webkit.org/show_bug.cgi?id=50619
3151
3152         Reviewed by Martin Robinson.
3153
3154         Implemented the OPENTYPE_VERTICAL feature for the GTK+ port. It resolves
3155         the 90 degrees rotation problem of CJK characters when displaying
3156         vertical text.
3157
3158         New tests are not required as the existing tests for vertical text will
3159         work properly now.
3160
3161         * GNUmakefile.list.am: Added OpenTypeVerticalData.cpp and
3162         OpenTypeVerticalData.h to platformgtk_sources.
3163         * PlatformEfl.cmake: Added OpenTypeVerticalData.cpp.
3164         * PlatformGTK.cmake: Added OpenTypeVerticalData.cpp.
3165         * platform/graphics/FontCache.cpp: Originally the HashMap for
3166         OpenTypeVerticalData was designed with FontFileKey as integer in the
3167         Chromium port, which was an unique number provided by Skia. Since other
3168         ports use FontFileKey as string, new generic hash functions had to be
3169         implemented instead of using the specific ones for integers.
3170         (WebCore::FontVerticalDataCacheKeyHash::hash): New hash function for
3171         HashMap of OpenTypeVerticalData.
3172         (WebCore::FontVerticalDataCacheKeyHash::equal): New function for
3173         comparing hash indexes in the HashMap of OpenTypeVerticalData.
3174         (WebCore::FontVerticalDataCacheKeyTraits::emptyValue): New function for
3175         giving an empty FontFileKey.
3176         (WebCore::FontVerticalDataCacheKeyTraits::constructDeletedValue): New
3177         function to create a FontFileKey for deleted values.
3178         (WebCore::FontVerticalDataCacheKeyTraits::isDeletedValue): New function
3179         to check if a HashMap entry is available.
3180         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
3181         (WebCore::FontCustomPlatformData::fontPlatformData): Added font
3182         orientation as a parameter to the FontPlatformData constructor.
3183         * platform/graphics/freetype/FontPlatformData.h: Added m_orientation to
3184         store the font orientation and m_horizontalOrientationMatrix to store
3185         the Cairo matrix for horizontal orientation, which can be restored in
3186         setOrientation().
3187         (WebCore::FontPlatformData::FontPlatformData): Added font orientation as
3188         a parameter.
3189         (WebCore::FontPlatformData::orientation): Implemented this function
3190         based on m_orientation.
3191         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Added new
3192         helper function rotateCairoMatrixForVerticalOrientation() to rotate the
3193         Cairo matrix in case of vertical orientation.
3194         (WebCore::FontPlatformData::FontPlatformData): Initialized
3195         m_orientation.
3196         (WebCore::FontPlatformData::operator=): Added m_orientation and
3197         m_horizontalOrientationMatrix to the assignment operator.
3198         (WebCore::FontPlatformData::operator==): Added m_orientation to the
3199         equal operator.
3200         (WebCore::FontPlatformData::initializeWithFontFace): Rotated and
3201         translated fonts if orientation is vertical. Also stored the horizontal
3202         Cairo matrix.
3203         (WebCore::FontPlatformData::verticalData): Returned the vertical data
3204         from the font cache.
3205         (WebCore::FontPlatformData::openTypeTable): Loaded the font table into
3206         a shared buffer.
3207         (WebCore::FontPlatformData::setOrientation): Replaced the scaled font
3208         data by rotating fonts according to the new orientation.
3209         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3210         (WebCore::SimpleFontData::platformInit): Set the glyph's height and
3211         width according to the font orientation. It also sets EM.
3212         (WebCore::SimpleFontData::platformCreateScaledFontData): Added
3213         orientation to the FontPlatformData constructor.
3214         (WebCore::SimpleFontData::platformWidthForGlyph): Returned the glyph's
3215         width according the orientation.
3216         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
3217         (WebCore::CairoGetGlyphWidthAndExtents): Obtained the character advance
3218         and extents according to the font orientation.
3219
3220 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3221
3222         [AX] Use toAccessibilityRenderObject() instead of using static_cast<>
3223         https://bugs.webkit.org/show_bug.cgi?id=123986
3224
3225         Reviewed by Mario Sanchez Prada.
3226
3227         Though there is toAccessibilityRenderObject(), static_cast<> are being used by many places.
3228         To use toAccessibilityRenderObject() is more helpful to find bad type cast.
3229
3230         No new tests, no behavior changes.
3231
3232         * accessibility/AXObjectCache.cpp:
3233         (WebCore::AXObjectCache::notificationPostTimerFired):
3234         * accessibility/AccessibilityImageMapLink.cpp:
3235         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
3236         * accessibility/AccessibilityRenderObject.cpp:
3237         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
3238         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
3239         * accessibility/ios/AccessibilityObjectIOS.mm:
3240         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
3241         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3242         (AXAttributeStringSetElement):
3243         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3244
3245 2013-11-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3246
3247         [AX] Use toAccessibilityTable() instead of using manual static_cast<>
3248         https://bugs.webkit.org/show_bug.cgi?id=123982
3249
3250         Reviewed by Mario Sanchez Prada.
3251
3252         Though there is toAccessibilityTable(), static_cast<> are being used by many places.
3253         We need to use toAccessibilityTable().
3254
3255         No new tests, no behavior changes.
3256
3257         * accessibility/AccessibilityARIAGridRow.cpp:
3258         (WebCore::AccessibilityARIAGridRow::disclosedRows):
3259         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
3260         * accessibility/AccessibilityTableHeaderContainer.cpp:
3261         (WebCore::AccessibilityTableHeaderContainer::addChildren):
3262         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
3263         (cell):
3264         (cellAtIndex):
3265         (webkitAccessibleTableGetIndexAt):
3266         (webkitAccessibleTableGetNColumns):
3267         (webkitAccessibleTableGetNRows):
3268         (webkitAccessibleTableGetColumnHeader):
3269         (webkitAccessibleTableGetRowHeader):
3270         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3271         (-[WebAccessibilityObjectWrapper tableParent]):
3272         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3273         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3274         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3275         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3276
3277 2013-11-07  Andreas Kling  <akling@apple.com>
3278
3279         Use tighter InlineBox subtypes in some places.
3280         <https://webkit.org/b/123980>
3281
3282         RenderLineBreak and RenderBox line box wrappers are always going to
3283         be InlineElementBox, so codify this with tighter types. Also made
3284         the various positionLine() functions take tighter reference types.
3285
3286         All the casting to renderer-appropriate box types happens inside of
3287         RenderBlockFlow::computeBlockDirectionPositionsForLine() and
3288         propagates from there.
3289
3290         Reviewed by Antti Koivisto.
3291
3292 2013-11-07  Mario Sanchez Prada  <mario.prada@samsung.com>
3293
3294         AX: [ATK] Video and audio elements are not properly exposed
3295         https://bugs.webkit.org/show_bug.cgi?id=123894
3296
3297         Reviewed by Chris Fleizach.
3298
3299         Expose <audio> and <video> elements with ATK_ROLE_EMBEDDED, so we
3300         can identify them properly from ATK/AT-SPI based ATs.
3301
3302         Tests: platform/gtk/accessibility/media-controls-panel-title.html
3303                platform/efl/accessibility/media-emits-object-replacement.html
3304                platform/gtk/accessibility/media-emits-object-replacement.html
3305
3306         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3307         (atkRole): Add the new mapping.
3308
3309 2013-11-07  Laszlo Vidacs  <lac@inf.u-szeged.hu>
3310         
3311         Fix crash in BitmapImage::destroyDecodedData()
3312         https://bugs.webkit.org/show_bug.cgi?id=116494
3313
3314         Reviewed by Csaba Osztrogonác.
3315
3316         Merge from https://chromium.googlesource.com/chromium/blink/+/6b6887bf53068f8537908e501fdc7317ad2c6d86
3317
3318         * platform/graphics/BitmapImage.cpp:
3319         (WebCore::BitmapImage::destroyDecodedData):
3320
3321 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
3322
3323         [CSS Grid Layout] CSSParser should reject <track-list> without a <track-size>
3324         https://bugs.webkit.org/show_bug.cgi?id=118025
3325
3326         Reviewed by Andreas Kling.
3327
3328         From Blink r152914 by <jchaffraix@chromium.org>
3329
3330         Make sure that we parse at least 1 <track-size> inside each
3331         <track-list>. The old parser code allowed track-lists exclusively
3332         made of <track-name>. The way it was implemented eases the future
3333         addition of parsing for the repeat() function.
3334
3335         * css/CSSParser.cpp:
3336         (WebCore::CSSParser::parseGridTrackList):
3337         * css/StyleResolver.cpp:
3338         (WebCore::createGridTrackList): ASSERT if we don't find any
3339         <track-size> now that we detect their absence in the parser.
3340
3341 2013-11-06  Sergio Villar Senin  <svillar@igalia.com>
3342
3343         [CSS Grid Layout] Fix handling of 'inherit' and 'initial' for grid lines
3344         https://bugs.webkit.org/show_bug.cgi?id=115401
3345
3346         Reviewed by Andreas Kling.
3347
3348         From Blink r150585 by <jchaffraix@chromium.org>
3349
3350         Added support for 'inherit' and 'initial' special values to
3351         grid-auto-{columns|rows} and grid-definition-{columns|rows}.
3352
3353         * css/StyleResolver.cpp:
3354         (WebCore::StyleResolver::applyProperty): Resolve 'initial' and 'inherit'.
3355         * rendering/style/RenderStyle.h: Added initialNamedGrid{Column|Row}Lines().
3356         * rendering/style/StyleGridData.cpp:
3357         (WebCore::StyleGridData::StyleGridData): Initialize m_namedGrid{Column|Row}Lines.
3358
3359 2013-11-07  Andreas Kling  <akling@apple.com>
3360
3361         Clean up BidiRun a little bit.
3362         <https://webkit.org/b/123964>
3363
3364         Make BidiRun's member variables private and add accessors for them.
3365         In doing so, codify the following:
3366
3367             - BidiRun always has a corresponding RenderObject.
3368             - The inline box is never cleared after being set.
3369
3370         Reviewed by Antti Koivisto.
3371
3372 2013-11-07  Andreas Kling  <akling@apple.com>
3373
3374         More CSSPrimitiveValue constructors should return PassRef.
3375         <https://webkit.org/b/123953>
3376
3377         Make some more CSSPrimitiveValue constructor helpers (that are
3378         known to never return null) return PassRef instead of PassRefPtr.
3379
3380         Reviewed by Antti Koivisto.
3381
3382 2013-11-07  Andreas Kling  <akling@apple.com>
3383
3384         Generate type casting helpers for line boxes and use them.
3385         <https://webkit.org/b/123976>
3386
3387         Semi-automatically generate the full set of toFooInlineBox()
3388         helpers with macros instead of having them (partially) hand-coded.
3389         Replaced static_casts with the new helpers across the codebase.
3390
3391         Also made the isFooInlineBox() overrides private since they should
3392         never be called when the type is already known.
3393
3394         Reviewed by Antti Koivisto.
3395
3396 2013-11-07  Ryosuke Niwa  <rniwa@webkit.org>
3397
3398         Simplify Attr by removing m_specified member variable and setter
3399         https://bugs.webkit.org/show_bug.cgi?id=123965
3400
3401         Reviewed by Andreas Kling.
3402
3403         Merge https://chromium.googlesource.com/chromium/blink/+/597f44ec928e08820574728889adabc6d8ecd746
3404
3405         m_specified is always true in WebKit so simply return true in Attr::specified().
3406
3407         * dom/Attr.cpp:
3408         (WebCore::Attr::Attr):
3409         * dom/Attr.h:
3410         * dom/Document.cpp:
3411         (WebCore::Document::adoptNode):
3412
3413 2013-10-25  Jer Noble  <jer.noble@apple.com>
3414
3415         [MSE] Add MediaSource extensions to AudioTrack, VideoTrack, and TextTrack.
3416         https://bugs.webkit.org/show_bug.cgi?id=123374
3417
3418         Reviewed by Eric Carlson.
3419
3420         No tests added; tests will be added when Mock implementations are added in a future patch.
3421
3422         Add new partial interfaces for added methods on AudioTrack, TextTrack, and VideoTrack:
3423         * Modules/mediasource/AudioTrackMediaSource.idl: Add read-only sourceBuffer attribute.
3424         * Modules/mediasource/TextTrackMediaSource.idl: Ditto.
3425         * Modules/mediasource/VideoTrackMediaSource.idl: Ditto.
3426         * Modules/mediasource/AudioTrackMediaSource.h:
3427         (WebCore::AudioTrackMediaSource::sourceBuffer): Added static wrapper around non-static sourceBuffer().
3428         * Modules/mediasource/TextTrackMediaSource.h:
3429         (WebCore::TextTrackMediaSource::sourceBuffer): Ditto.
3430         * Modules/mediasource/VideoTrackMediaSource.h:
3431         (WebCore::VideoTrackMediaSource::sourceBuffer): Ditto.
3432
3433         Add support for writable kind & language attributes through a custom setter:
3434         * bindings/js/JSAudioTrackCustom.cpp:
3435         (WebCore::JSAudioTrack::setKind):
3436         (WebCore::JSAudioTrack::setLanguage):
3437         * bindings/js/JSTextTrackCustom.cpp:
3438         (WebCore::JSTextTrack::setKind):
3439         (WebCore::JSTextTrack::setLanguage):
3440         * bindings/js/JSVideoTrackCustom.cpp:
3441         (WebCore::JSVideoTrack::setKind):
3442         (WebCore::JSVideoTrack::setLanguage):
3443         * html/track/AudioTrack.idl:
3444         * html/track/TextTrack.idl:
3445         * html/track/VideoTrack.idl:
3446
3447         Add setter methods to the implementation classes:
3448         * html/track/TextTrack.cpp:
3449         (WebCore::TextTrack::TextTrack):
3450         (WebCore::TextTrack::setKind):
3451         (WebCore::TextTrack::setLanguage):
3452         * html/track/TextTrack.h:
3453         * html/track/TrackBase.cpp:
3454         (WebCore::TrackBase::TrackBase):
3