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