5b2603013aecfa9a5dcc27753269fbc7b9576dd0
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
2
3         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in loader
4         https://bugs.webkit.org/show_bug.cgi?id=130893
5
6         Reviewed by Darin Adler.
7
8         * loader/ImageLoader.cpp:
9         (WebCore::beforeLoadEventSender):
10         (WebCore::loadEventSender):
11         (WebCore::errorEventSender):
12         * loader/appcache/ApplicationCacheStorage.cpp:
13         (WebCore::cacheStorage):
14         * loader/appcache/ApplicationCacheStorage.h:
15         * loader/archive/ArchiveFactory.cpp:
16         (WebCore::archiveMIMETypes):
17         * loader/cache/CachedImage.cpp:
18         (WebCore::CachedImage::brokenImage):
19         * loader/cache/CachedRawResource.cpp:
20         (WebCore::shouldIgnoreHeaderForCacheReuse):
21         * loader/cache/MemoryCache.cpp:
22         (WebCore::dummyCachedImageClient):
23
24 2014-03-28  Sergio Villar Senin  <svillar@igalia.com>
25
26         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in css
27         https://bugs.webkit.org/show_bug.cgi?id=130409
28
29         Reviewed by Darin Adler.
30
31         * css/CSSComputedStyleDeclaration.cpp:
32         (WebCore::logUnimplementedPropertyID):
33         * css/CSSDefaultStyleSheets.cpp:
34         (WebCore::screenEval):
35         (WebCore::printEval):
36         * css/CSSParser.cpp:
37         (WebCore::strictCSSParserContext):
38         * css/CSSPrimitiveValue.cpp:
39         (WebCore::cssTextCache):
40         * css/CSSProperty.cpp:
41         (WebCore::borderDirections):
42         * css/CSSStyleRule.cpp:
43         (WebCore::selectorTextCache):
44         * css/CSSValuePool.cpp:
45         (WebCore::cssValuePool):
46         * css/CSSValuePool.h:
47         * css/DeprecatedStyleBuilder.cpp:
48         (WebCore::ApplyPropertyPageSize::getPageSizeFromName):
49         (WebCore::DeprecatedStyleBuilder::sharedStyleBuilder):
50         * css/DeprecatedStyleBuilder.h:
51
52 2014-03-30  Xabier Rodriguez Calvar  <calvaris@igalia.com>
53
54         [GTK] [TextureMapper] Weird brightness with some videos with acceletared compositing
55         https://bugs.webkit.org/show_bug.cgi?id=130665
56
57         Reviewed by Martin Robinson.
58
59         When we uploaded a video texture to the mapper we were not
60         considering that some videos could be decoded into a format
61         without alpha component. Now we check if the video has alpha and
62         if it does not, we remove the alpha flag when retrieving the
63         texture from the pool. For this, the method to get the texture
64         from the pool was modified to receive the flags, that is mapped to
65         have alpha by default in order not to break any other existing
66         code.
67
68         Though we have a problem with AC in WTR and that makes it
69         currently not testable, no new tests are needed because once this
70         is fixed the current test set suffices to detect a possible
71         regression in this.
72
73         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
74         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): Check
75         the video format and decide if the texture shall be pulled with
76         alpha support or not.
77         * platform/graphics/texmap/TextureMapper.cpp:
78         (WebCore::TextureMapper::acquireTextureFromPool): Use the flags
79         when resetting the texture.
80         * platform/graphics/texmap/TextureMapper.h:
81         (WebCore::BitmapTexture::Flag::None): Added with 0x00.
82         (WebCore::TextureMapper::acquireTextureFromPool): Added flag
83         parameter to set up the texture with the default for including
84         alpha channel.
85
86 2014-03-30  Jinwoo Song  <jinwoo7.song@samsung.com>
87
88         Adopt range-based for loops to TextCheckerEnchant
89         https://bugs.webkit.org/show_bug.cgi?id=130714
90
91         Reviewed by Darin Adler.
92
93         * platform/text/enchant/TextCheckerEnchant.cpp:
94         (WebCore::TextCheckerEnchant::ignoreWord):
95         (WebCore::TextCheckerEnchant::learnWord):
96         (WebCore::TextCheckerEnchant::checkSpellingOfWord):
97         (WebCore::TextCheckerEnchant::getGuessesForWord):
98         (WebCore::TextCheckerEnchant::updateSpellCheckingLanguages):
99         (WebCore::TextCheckerEnchant::loadedSpellCheckingLanguages):
100         (WebCore::TextCheckerEnchant::availableSpellCheckingLanguages):
101         (WebCore::TextCheckerEnchant::freeEnchantBrokerDictionaries):
102
103 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
104
105         Second attempt to fix 32bits build after r166465
106
107         * rendering/style/RenderStyle.h:
108         The compiler probably complain about the return value, that makes more sense.
109
110 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
111
112         Attempt to fix 32bits build after r166465
113
114         * rendering/style/RenderStyle.h:
115
116 2014-03-30  Benjamin Poulain  <benjamin@webkit.org>
117
118         Make RenderStyle's non inherited flags more JSC friendly
119         https://bugs.webkit.org/show_bug.cgi?id=130939
120
121         Reviewed by Andreas Kling.
122
123         Make RenderStyle::NonInheritedFlags accessible to the JIT:
124         -Make the struct public to give access to the offset.
125         -Move away from a bit field to static offsets we can use
126          with the MacroAssembler.
127         -Reorder the field to simplify bit access of the flags we need.
128
129         * css/DeprecatedStyleBuilder.cpp:
130         (WebCore::ApplyPropertyVerticalAlign::createHandler):
131         (WebCore::ApplyPropertyDisplay::applyInitialValue):
132         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
133         * css/StyleResolver.cpp:
134         (WebCore::StyleResolver::adjustRenderStyle):
135         * rendering/style/RenderStyle.cpp:
136         (WebCore::RenderStyle::RenderStyle):
137         (WebCore::RenderStyle::copyNonInheritedFrom):
138         (WebCore::RenderStyle::hashForTextAutosizing):
139         (WebCore::RenderStyle::equalForTextAutosizing):
140         (WebCore::RenderStyle::changeRequiresLayout):
141         * rendering/style/RenderStyle.h:
142         (WebCore::RenderStyle::hasAnyPublicPseudoStyles):
143         (WebCore::RenderStyle::hasPseudoStyle):
144         (WebCore::RenderStyle::setHasPseudoStyle):
145         * rendering/style/StyleMultiColData.cpp:
146         (WebCore::StyleMultiColData::StyleMultiColData):
147         * rendering/style/StyleRareNonInheritedData.cpp:
148         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
149
150 2014-03-30  David Kilzer  <ddkilzer@apple.com>
151
152         [iOS] Fix build of HTMLConverter.mm after r166454
153
154         Fixes the following build failures:
155
156             WebCore/editing/cocoa/HTMLConverter.mm:1507:13: error: value of type 'WebCore::Element' is not contextually convertible to 'bool'
157                     if (element)
158                         ^~~~~~~
159             WebCore/editing/cocoa/HTMLConverter.mm:1508:49: error: no matching function for call to 'core'
160                         _caches->floatPropertyValueForNode(*core(element), CSSPropertyVerticalAlign, verticalAlign);
161                                                             ^~~~
162             In file included from WebCore/editing/cocoa/HTMLConverter.mm:41:
163             In file included from WebCore/page/Frame.h:42:
164             In file included from WebCore/editing/VisibleSelection.h:30:
165             In file included from WebCore/editing/VisiblePosition.h:30:
166             In file included from WebCore/dom/Position.h:31:
167             WebCore/editing/TextAffinity.h:54:27: note: candidate function not viable: no known conversion from 'WebCore::Element' to 'NSSelectionAffinity' (aka '_NSSelectionAffinity') for 1st argument
168             inline WebCore::EAffinity core(NSSelectionAffinity affinity)
169                                       ^
170             WebCore/editing/cocoa/HTMLConverter.mm:1509:81: error: reference to non-static member function must be called; did you mean to call it with no arguments?
171                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
172                                                                                     ~~~~~~~~^~~~~~~~~~~~
173                                                                                                         ()
174             WebCore/editing/cocoa/HTMLConverter.mm:1509:103: error: reference to non-static member function must be called; did you mean to call it with no arguments?
175                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
176                                                                                                           ~~~~~~~~^~~~~~~~~~~
177                                                                                                                              ()
178             WebCore/editing/cocoa/HTMLConverter.mm:1509:124: error: reference to non-static member function must be called; did you mean to call it with no arguments?
179                     attachment.get().bounds = CGRectMake(0, (verticalAlign / 100) * element.clientHeight, element.clientWidth, element.clientHeight);
180                                                                                                                                ~~~~~~~~^~~~~~~~~~~~
181                                                                                                                                                    ()
182             5 errors generated.
183
184         * editing/cocoa/HTMLConverter.mm:
185         (HTMLConverter::_addAttachmentForElement):
186
187 2014-03-30  Andreas Kling  <akling@apple.com>
188
189         Make NodeList and HTMLCollection caching helpers use PassRef.
190         <https://webkit.org/b/130943>
191
192         Tweak the helpers in NodeListsNodeData to return PassRef instead of
193         PassRefPtr. This knocks 2 branches off of some pretty hot code on
194         Dromaeo/dom-query.
195
196         Reviewed by Antti Koivisto.
197
198         * dom/ChildNodeList.h:
199         * dom/ClassNodeList.h:
200         * dom/NameNodeList.h:
201         * dom/NodeRareData.h:
202         (WebCore::NodeListsNodeData::ensureChildNodeList):
203         (WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
204         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
205         (WebCore::NodeListsNodeData::addCacheWithName):
206         (WebCore::NodeListsNodeData::addCacheWithQualifiedName):
207         (WebCore::NodeListsNodeData::addCachedCollection):
208         * dom/TagNodeList.h:
209         * html/HTMLCollection.cpp:
210         (WebCore::HTMLCollection::create):
211         * html/HTMLCollection.h:
212         * html/HTMLFormControlsCollection.cpp:
213         (WebCore::HTMLFormControlsCollection::create):
214         * html/HTMLFormControlsCollection.h:
215         * html/RadioNodeList.h:
216
217 2014-03-29  Antti Koivisto  <antti@apple.com>
218
219         LiveNodeLists should use ElementDescendantIterator
220         https://bugs.webkit.org/show_bug.cgi?id=130931
221
222         Reviewed by Andreas Kling.
223         
224         Make LiveNodeList traversal use the common DOM tree iterator.
225
226         * dom/ChildNodeList.cpp:
227         (WebCore::ChildNodeList::ChildNodeList):
228         (WebCore::ChildNodeList::collectionBegin):
229         (WebCore::ChildNodeList::collectionTraverseForward):
230         (WebCore::ChildNodeList::collectionTraverseBackward):
231         (WebCore::ChildNodeList::invalidateCache):
232         (WebCore::ChildNodeList::collectionFirst): Deleted.
233         
234             Iterator for ChildNodeList is still just Node*.
235
236         * dom/ChildNodeList.h:
237         * dom/CollectionIndexCache.h:
238         (WebCore::CollectionIndexCache::hasValidCache):
239         (WebCore::Iterator>::CollectionIndexCache):
240         (WebCore::Iterator>::nodeCount):
241         (WebCore::Iterator>::computeNodeCountUpdatingListCache):
242         (WebCore::Iterator>::traverseBackwardTo):
243         (WebCore::Iterator>::traverseForwardTo):
244         (WebCore::Iterator>::nodeAt):
245         (WebCore::Iterator>::invalidate):
246         
247             Make CollectionIndexCache iterator based instead of using NodeType*. The iterator type may
248             still be a Node* though.
249
250         (WebCore::NodeType>::CollectionIndexCache): Deleted.
251         (WebCore::NodeType>::nodeCount): Deleted.
252         (WebCore::NodeType>::computeNodeCountUpdatingListCache): Deleted.
253         (WebCore::NodeType>::nodeBeforeCached): Deleted.
254         (WebCore::NodeType>::nodeAfterCached): Deleted.
255         (WebCore::NodeType>::nodeAt): Deleted.
256         (WebCore::NodeType>::invalidate): Deleted.
257         * dom/ElementDescendantIterator.h:
258         (WebCore::ElementDescendantIterator::operator--):
259         
260             Add backward iteration support.
261
262         (WebCore::ElementDescendantIteratorAdapter::last):
263         (WebCore::ElementDescendantConstIteratorAdapter::last):
264         
265             Add a way to get the last item.
266             Provide std::iterator_traits so we can extract the type.
267
268         * dom/LiveNodeList.h:
269         (WebCore::CachedLiveNodeList::collectionEnd):
270         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
271         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
272         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
273         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
274         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
275         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
276         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
277         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst): Deleted.
278         
279             Make LiveNodeList traversal use ElementDescendantIterator.
280
281         (WebCore::nextMatchingElement): Deleted.
282         (WebCore::previousMatchingElement): Deleted.
283         * html/HTMLCollection.cpp:
284         (WebCore::HTMLCollection::HTMLCollection):
285         (WebCore::HTMLCollection::~HTMLCollection):
286         (WebCore::HTMLCollection::collectionBegin):
287         (WebCore::HTMLCollection::collectionTraverseForward):
288         (WebCore::HTMLCollection::collectionTraverseBackward):
289         (WebCore::HTMLCollection::invalidateCache):
290         (WebCore::HTMLCollection::collectionFirst): Deleted.
291         * html/HTMLCollection.h:
292         (WebCore::HTMLCollection::collectionEnd):
293         
294             HTMLCollection still uses Element* as iterator for now.
295
296 2014-03-29  Commit Queue  <commit-queue@webkit.org>
297
298         Unreviewed, rolling out r166434.
299         https://bugs.webkit.org/show_bug.cgi?id=130938
300
301         Caused crashes and other failures on cache tests (Requested by
302         ap on #webkit).
303
304         Reverted changeset:
305
306         "Web Replay: add page-level setting to bypass the MemoryCache"
307         https://bugs.webkit.org/show_bug.cgi?id=130728
308         http://trac.webkit.org/changeset/166434
309
310 2014-03-29  David Kilzer  <ddkilzer@apple.com>
311
312         Preserve selection end positions in directionOfSelection
313         <http://webkit.org/b/104813>
314         <rdar://problem/13666417>
315
316         Reviewed by Brent Fulgham.
317
318         Merged from Blink (patch by kenrb@chromium.org):
319         https://src.chromium.org/viewvc/blink?revision=150621&view=revision
320         http://crbug.com/164263
321
322             VisibleSelection::visibleStart() and VisibleSelection::visibleEnd()
323             can both cause layouts, which has the potential to invalidate any
324             rendertree-based objects. This was causing a problem in
325             FrameSelection::directionOfSelection(), where a reference to a
326             lineBox was being held across a call to visibleEnd().
327
328             This patch ensures that the any layout is completed before linebox
329             references are retrieved.
330
331         Test: editing/selection/layout-during-move-selection-crash.html
332
333         * editing/FrameSelection.cpp:
334         (WebCore::FrameSelection::directionOfSelection):
335
336 2014-03-29  Zalan Bujtas  <zalan@apple.com>
337
338         Subpixel rendering: Simple line layout should not round to integral position while painting.
339         https://bugs.webkit.org/show_bug.cgi?id=130934
340
341         Reviewed by Simon Fraser.
342
343         Remove rounding to integral position. When RenderLayer is injected and hides subpixel positions,
344         integral rounding produces different paint position.
345
346         Test: fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition.html
347
348         * rendering/SimpleLineLayoutFunctions.cpp:
349         (WebCore::SimpleLineLayout::paintFlow):
350
351 2014-03-29  Zalan Bujtas  <zalan@apple.com>
352
353         Subpixel rendering: Make GraphicsContext::drawImageBuffer* functions float based.
354         https://bugs.webkit.org/show_bug.cgi?id=130932
355
356         Reviewed by Simon Fraser.
357         
358         This is in preparation to support device pixel based filter painting.
359         Filter calculation is still integral based.
360
361         No change in behavior.
362
363         * platform/graphics/GraphicsContext.cpp:
364         (WebCore::GraphicsContext::drawImageBuffer):
365         * platform/graphics/GraphicsContext.h:
366         * platform/graphics/filters/FilterEffect.cpp: This will eventually be fully float based.
367         Right now, this IntRect->FloatRect change is only to ensure that we can call 
368         the float based drawImageBuffer(). 
369         (WebCore::FilterEffect::drawingRegionOfInputImage):
370         * platform/graphics/filters/FilterEffect.h:
371
372 2014-03-27  Sam Weinig  <sam@webkit.org>
373
374         Convert yet more of HTMLConverter to C++
375         https://bugs.webkit.org/show_bug.cgi?id=130850
376
377         Reviewed by Anders Carlsson.
378
379         * editing/cocoa/HTMLConverter.mm:
380         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
381         (HTMLConverter::HTMLConverter):
382         (HTMLConverter::~HTMLConverter):
383         (HTMLConverter::convert):
384         (HTMLConverter::computedAttributesForElement):
385         (HTMLConverter::attributesForElement):
386         (HTMLConverter::_newParagraphForElement):
387         (HTMLConverter::_newLineForElement):
388         (HTMLConverter::_newTabForElement):
389         (HTMLConverter::_addAttachmentForElement):
390         (HTMLConverter::_addQuoteForElement):
391         (HTMLConverter::_addValue):
392         (HTMLConverter::_processHeadElement):
393         (HTMLConverter::_enterElement):
394         (HTMLConverter::_addTableCellForElement):
395         (HTMLConverter::_processElement):
396         (HTMLConverter::_addMarkersToList):
397         (HTMLConverter::_exitElement):
398         (HTMLConverter::_processText):
399         (HTMLConverter::_traverseNode):
400         (HTMLConverter::_traverseFooterNode):
401         (WebCore::attributedStringFromRange):
402         (_childrenForNode): Deleted.
403         (HTMLConverter::_computedAttributesForElement): Deleted.
404         (HTMLConverter::_attributesForElement): Deleted.
405         (HTMLConverter::_loadFromDOMRange): Deleted.
406
407 2014-03-28  Csaba Osztrogonác  <ossy@webkit.org>
408
409         Unreviewed buildfix after r166441 and r166443.
410
411         * CMakeLists.txt: Add platform/audio/AudioHardwareListener.cpp.
412
413 2014-03-28  Javier Fernandez  <jfernandez@igalia.com>
414
415         [CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
416         https://bugs.webkit.org/show_bug.cgi?id=130920
417
418         Reviewed by Darin Adler.
419
420         Adding the grid-item's marginLogicalHeight to the used breadth when computing
421         content based grid-track sizes.
422
423         Test: fast/css-grid-layout/grid-item-margin-auto-columns-rows.html
424
425         * rendering/RenderGrid.cpp:
426         (WebCore::RenderGrid::logicalContentHeightForChild):
427
428 2014-03-28  James Craig  <jcraig@apple.com>
429
430         Web Inspector: AXI: support for live regions
431         https://bugs.webkit.org/show_bug.cgi?id=130725
432
433         Reviewed by Timothy Hatcher.
434
435         Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
436                inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html
437
438         Initial support for @aria-live, @aria-atomic, and @aria-busy.
439
440         * inspector/InspectorDOMAgent.cpp:
441         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
442         * inspector/protocol/DOM.json:
443
444 2014-03-28  Darin Adler  <darin@apple.com>
445
446         Fix recently-introduced off-by-one error in centerTruncateToBuffer
447         https://bugs.webkit.org/show_bug.cgi?id=130889
448         <rdar://problem/16408694>
449
450         Reviewed by Alexey Proskuryakov.
451
452         * platform/graphics/StringTruncator.cpp:
453         (WebCore::centerTruncateToBuffer): Simplified expression that computes truncatedLength.
454         Removed incorrect "+ 1" from computation of where to write characters.
455
456 2014-03-28  Benjamin Poulain  <bpoulain@apple.com>
457
458         Update the code related to SelectorPseudoTypeMap to reflect its new purpose
459         https://bugs.webkit.org/show_bug.cgi?id=130620
460
461         Reviewed by Andreas Kling.
462
463         Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.
464
465         This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
466         to split PseudoClass and PseudoElement.
467
468         * CMakeLists.txt:
469         * DerivedSources.make:
470         * WebCore.xcodeproj/project.pbxproj:
471         * css/CSSGrammar.y.in:
472         * css/CSSParserValues.cpp:
473         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
474         (WebCore::CSSParserSelector::setPseudoClassValue):
475         * css/CSSParserValues.h:
476         * css/CSSSelector.cpp:
477         (WebCore::appendPseudoClassFunctionTail):
478         (WebCore::CSSSelector::selectorText):
479         * css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
480         * css/SelectorPseudoTypeMap.h:
481         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
482         (enumerablePseudoType):
483         (expand_ifdef_condition):
484
485 2014-03-28  Stephanie Lewis  <slewis@apple.com>
486
487         Unreviewed build fix.
488
489         * platform/audio/AudioHardwareListener.cpp:
490         (WebCore::AudioHardwareListener::create):
491         (WebCore::AudioHardwareListener::audioHardwareListenerIsSupported): Deleted.
492         * platform/audio/AudioHardwareListener.h:
493
494 2014-03-28  Lukasz Bialek  <l.bialek@samsung.com>
495
496         Refactor cut and copy functions as suggested in FIXME line
497         https://bugs.webkit.org/show_bug.cgi?id=129867
498
499         Reviewed by Darin Adler.
500
501         Cut and Copy functions in Editor.cpp use lots of common code.
502         Those functions are merged into one to share code, several
503         additional conditions are added to preserve Cut and Copy
504         functionality.
505
506         * editing/Editor.cpp:
507         (WebCore::Editor::cut):
508         (WebCore::Editor::copy):
509         (WebCore::Editor::performCutOrCopy):
510         * editing/Editor.h:
511
512 2014-03-28  Stephanie Lewis  <slewis@apple.com>
513
514         Rename pluginDidEvaluate to better represent when it’s called.
515         Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
516
517         Reviewed by Anders Carlsson.
518
519         No new test because it’s just a name change.
520
521         * page/PageThrottler.h:
522         (WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):
523
524 2014-03-28  Stephanie Lewis  <slewis@apple.com>
525
526         Notification handler for telling if audio hardware is active.
527         https://bugs.webkit.org/show_bug.cgi?id=130743
528
529         Reviewed by Jer Noble.
530
531         Not web-exposed so no easy way to test.
532
533         Listen to CoreAudio to see if audio hardware is active in the current process.
534
535         * WebCore.exp.in:
536         * WebCore.xcodeproj/project.pbxproj:
537         * platform/audio/AudioHardwareListener.cpp: Added.
538         (WebCore::AudioHardwareListener::create):
539         (WebCore::AudioHardwareListener::AudioHardwareListener):
540         * platform/audio/AudioHardwareListener.h: Added.
541         (WebCore::AudioHardwareListener::Client::~Client):
542         (WebCore::AudioHardwareListener::~AudioHardwareListener):
543         (WebCore::AudioHardwareListener::isHardwareActive):
544         * platform/audio/mac/AudioHardwareListenerMac.cpp: Added.
545         (WebCore::isAudioHardwareProcessRunning):
546         (WebCore::AudioHardwareListener::create):
547         (WebCore::AudioHardwareListenerMac::create):
548         (WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
549         (WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac):
550         (WebCore::AudioHardwareListenerMac::setHardwareActive):
551         * platform/audio/mac/AudioHardwareListenerMac.h: Added.
552
553 2014-03-28  James Craig  <jcraig@apple.com>
554
555         Web Inspector: AXI: expose what elements get generic "clickable" status
556         https://bugs.webkit.org/show_bug.cgi?id=130721
557
558         Reviewed by Timothy Hatcher.
559
560         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
561         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html
562
563         Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.
564
565         Update AccessibilityNodeObject::mouseButtonListener() to optionally return body element if 
566             requested so that Web Inspector can display body event delegate handlers.
567
568         * accessibility/AccessibilityNodeObject.cpp:
569         (WebCore::AccessibilityNodeObject::mouseButtonListener):
570         * accessibility/AccessibilityNodeObject.h:
571         * inspector/InspectorDOMAgent.cpp:
572         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
573         * inspector/protocol/DOM.json:
574
575 2014-03-28  Joseph Pecoraro  <pecoraro@apple.com>
576
577         Web Inspector: Really drop all locks in nested run loop on iOS if WebThread is enabled
578         https://bugs.webkit.org/show_bug.cgi?id=130912
579
580         Reviewed by Geoffrey Garen.
581
582         Previously we were calling DropAllLocks inside of a single line if statement,
583         so the JSLock was getting reaquired very quickly. We really want to DropAllLocks
584         for the duration of running the nested run loop on iOS if there is a WebThread.
585
586         * bindings/js/PageScriptDebugServer.h:
587         * bindings/js/PageScriptDebugServer.cpp:
588         (WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
589         (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):
590
591 2014-03-28  Brent Fulgham  <bfulgham@apple.com>
592
593         [Win] Enable Media Track testing features on Windows
594         https://bugs.webkit.org/show_bug.cgi?id=130851
595
596         Reviewed by Eric Carlson.
597
598         * testing/Internals.cpp:
599         (WebCore::Internals::resetToConsistentState): Execute code on Windows as well.
600         (WebCore::Internals::Internals): Ditto.
601         (WebCore::Internals::captionsStyleSheetOverride): Ditto.
602         (WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
603         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
604         (WebCore::Internals::setCaptionDisplayMode): Ditto.
605
606 2014-03-28  Brian Burg  <bburg@apple.com>
607
608         Web Replay: add page-level setting to bypass the MemoryCache
609         https://bugs.webkit.org/show_bug.cgi?id=130728
610
611         Reviewed by Timothy Hatcher.
612
613         When replaying a specific Page we don't want to store its cached resources in the
614         MemoryCache. This patch adds a page setting to prevent the page's resources from
615         being saved in the MemoryCache.
616
617         If Settings::usesMemoryCache() is false, page resources are given the special
618         SessionID bypassCacheSessionID(). The cached resource loader and memory cache
619         act as if the memory cache is disabled if the resource has this special session id.
620
621         Hook up ReplayController to override the memory cache setting during capture/replay.
622
623         Test: http/tests/cache/bypass-memory-cache-after-reload.html
624
625         * loader/cache/CachedResourceLoader.cpp:
626         (WebCore::CachedResourceLoader::requestResource):
627         (WebCore::CachedResourceLoader::revalidateResource):
628         * loader/cache/MemoryCache.cpp:
629         (WebCore::MemoryCache::add):
630         * page/Page.cpp:
631         (WebCore::Page::sessionID):
632         * page/SessionID.h:
633         (WebCore::SessionID::bypassCacheSessionID):
634         * page/Settings.cpp:
635         (WebCore::Settings::Settings):
636         * page/Settings.h:
637         (WebCore::Settings::setUsesMemoryCache):
638         (WebCore::Settings::usesMemoryCache):
639         * replay/ReplayController.cpp:
640         (WebCore::ReplayController::setForceDeterministicSettings):
641         * replay/ReplayController.h:
642         * testing/InternalSettings.cpp:
643         (WebCore::InternalSettings::Backup::Backup):
644         (WebCore::InternalSettings::Backup::restoreTo):
645         (WebCore::InternalSettings::setUsesMemoryCache):
646         * testing/InternalSettings.h:
647         * testing/InternalSettings.idl:
648
649 2014-03-28  Radu Stavila  <stavila@adobe.com>
650
651         In some situations, partial layouts of floating elements produce incorrect results.
652         https://bugs.webkit.org/show_bug.cgi?id=122668
653
654         Reviewed by David Hyatt.
655
656         When performing partial layout of float elements and checking if other float
657         elements are encountered, incorrect results were obtained by not checking
658         the size of the existing floats vector.
659
660         Test: fast/block/float/floats-in-clean-line-crash.html
661
662         * rendering/RenderBlockLineLayout.cpp:
663         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
664
665 2014-03-28  Beth Dakin  <bdakin@apple.com>
666
667         Build fix.
668
669         * rendering/RenderTheme.cpp:
670         (WebCore::RenderTheme::paint):
671
672 2014-03-28  Jer Noble  <jer.noble@apple.com>
673
674         [MSE] Implement support for SourceBuffer.remove()
675         https://bugs.webkit.org/show_bug.cgi?id=121562
676
677         Reviewed by Eric Carlson.
678
679         Test: media/media-source/media-source-remove.html
680
681         Add support for SourceBuffer.remove().
682
683         * Modules/mediasource/SourceBuffer.cpp:
684         (WebCore::SourceBuffer::SourceBuffer): Initialize new member variables.
685         (WebCore::SourceBuffer::setTimestampOffset): Update comments to match spec.
686         (WebCore::SourceBuffer::remove): Added; start removeTimer.
687         (WebCore::SourceBuffer::abortIfUpdating): Cancel removeTimer.
688         (WebCore::SourceBuffer::removedFromMediaSource): Call abortIfUpdating().
689         (WebCore::SourceBuffer::stop): Cancel removeTimer.
690         (WebCore::SourceBuffer::removeCodedFrames): Added.
691         (WebCore::SourceBuffer::removeTimerFired): Added.
692         * Modules/mediasource/SourceBuffer.h:
693         * Modules/mediasource/SourceBuffer.idl:
694
695 2014-03-27  Dean Jackson  <dino@apple.com>
696
697         Support form controls that may need incremental redraw
698         https://bugs.webkit.org/show_bug.cgi?id=130736
699
700         Reviewed by Beth Dakin.
701
702         There are some form controls that change appearance
703         over time. Expand the ControlStates so that it can
704         hold a little more information, including a reference
705         to the native form control. This way the Theme implementation
706         can repaint the existing native control if necessary. At
707         least ThemeMac was reusing a single control for painting
708         all instances before this change.
709
710         Since ControlStates is now a class, pass it around by
711         reference.
712
713         The other major change is keeping a timer to trigger a
714         repaint in RenderBox, which happens if Theme/RenderTheme
715         update the ControlState to request one.
716
717         * WebCore.xcodeproj/project.pbxproj: Add ControlStates.h.
718         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
719         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
720         * dom/Element.cpp:
721         (WebCore::Element::setActive): States now within ControlStates.
722         (WebCore::Element::setHovered): Ditto.
723         * editing/FrameSelection.cpp:
724         (WebCore::FrameSelection::focusedOrActiveStateChanged): Ditto.
725         * html/HTMLFormControlElement.cpp:
726         (WebCore::HTMLFormControlElement::disabledStateChanged): Ditto.
727         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
728         * html/HTMLInputElement.cpp:
729         (WebCore::HTMLInputElement::setChecked): Ditto.
730         (WebCore::HTMLInputElement::setIndeterminate): Ditto.
731         * html/HTMLOptionElement.cpp:
732         (WebCore::HTMLOptionElement::parseAttribute): Ditto.
733         * platform/ControlStates.h: New file. Copied the old ControlStates enum,
734         and added accessors to hold whether or not the state is dirty, and
735         a reference to a platform control if necessary.
736         * platform/Theme.h:
737         (WebCore::Theme::selectionColor): Pass ControlStates pointer.
738         (WebCore::Theme::paint): Ditto.
739         (WebCore::Theme::inflateControlPaintRect): Ditto.
740         * platform/ThemeTypes.h: Remove ControlStates enum.
741         * platform/efl/RenderThemeEfl.cpp:
742         (WebCore::RenderThemeEfl::applyEdjeStateFromForm): Pass ControlStates pointer.
743         (WebCore::RenderThemeEfl::paintThemePart): Ditto.
744         * platform/efl/RenderThemeEfl.h: Ditto.
745         * platform/mac/ThemeMac.h: Ditto.
746         * platform/mac/ThemeMac.mm:
747         (-[WebCoreThemeView addSubview:]): New method to make sure we don't add CALayer backed
748         views to the NSView we're using for rendering.
749         (WebCore::updateStates): Use the private animated setters if necessary.
750         (WebCore::convertControlStatesToThemeDrawState): Namespacing.
751         (WebCore::configureCheckbox): Pass ControlStates pointer.
752         (WebCore::createCheckboxCell): New helper since we're creating non-static cells.
753         (WebCore::sharedCheckboxCell): The old static provider, renamed.
754         (WebCore::paintCheckbox): Check if this paint was triggered by a state change
755         or an animation. Update the ControlStates if we need to be repainted.
756         (WebCore::radio): Parameter is now ControlStates*.
757         (WebCore::paintRadio): Ditto.
758         (WebCore::setUpButtonCell): Ditto.
759         (WebCore::button): Ditto.
760         (WebCore::paintButton): Ditto.
761         (WebCore::paintStepper): Ditto.
762         (WebCore::ThemeMac::ensuredView): Ditto.
763         (WebCore::ThemeMac::inflateControlPaintRect): Ditto.
764         (WebCore::ThemeMac::paint): Ditto.
765         (WebCore::checkbox): Deleted.
766         * rendering/RenderBox.cpp:
767         (WebCore::RenderBox::RenderBox): Initialize timer.
768         (WebCore::RenderBox::~RenderBox): Stop any pending timers and delete the ControlState if necessary.
769         (WebCore::RenderBox::paintBoxDecorations): Create a ControlStates if needed. Paint, and start the repaint
770         timer if the ControlStates say we should.
771         (WebCore::RenderBox::repaintTimerFired): Call repaint when the timer fires.
772         * rendering/RenderBox.h: Add a timer for repainting.
773         * rendering/RenderElement.cpp:
774         (WebCore::controlStatesRendererMap): A static HashMap that associates renderers with ControlStates.
775         (WebCore::RenderElement::hasControlStatesForRenderer):
776         (WebCore::RenderElement::controlStatesForRenderer):
777         (WebCore::RenderElement::removeControlStatesForRenderer):
778         (WebCore::RenderElement::addControlStatesForRenderer):
779         * rendering/RenderElement.h:
780         * rendering/RenderTheme.cpp:
781         (WebCore::RenderTheme::paint): Use a pointer to ControlStates.
782         (WebCore::RenderTheme::adjustRepaintRect): Ditto.
783         (WebCore::RenderTheme::stateChanged): Ditto.
784         (WebCore::RenderTheme::updateControlStatesForRenderer): New method that just updates the states part of ControlStates.
785         (WebCore::RenderTheme::extractControlStatesForRenderer): New method that calculates the state.
786         (WebCore::RenderTheme::controlStatesForRenderer): Deleted.
787         * rendering/RenderTheme.h:
788         * rendering/RenderThemeMac.mm:
789         (WebCore::RenderThemeMac::documentViewFor): Use a ControlStates pointer.
790
791 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
792
793         Clear SVGInlineTextBox fragments when the text changes.
794         https://bugs.webkit.org/show_bug.cgi?id=130879
795
796         Reviewed by Darin Adler.
797
798         Ported from Blink: https://src.chromium.org/viewvc/blink?revision=150456&view=revision
799
800         This patch modifies SVGInlineTextBox::dirtyLineBoxes to clear all
801         following text boxes when invoked. Typically this method is called
802         when the underlying text string changes, and that change needs to
803         be propagated to all the boxes that use the text beyond the point
804         where the text is first modified.
805         
806         Also cleans up final function keywords for SVGRootInlineBox.
807
808         Test: svg/custom/unicode-in-tspan-multi-svg-crash.html
809
810         * rendering/InlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
811         (WebCore::InlineTextBox::dirtyOwnLineBoxes): Calls dirtyLineBoxes()
812         * rendering/svg/SVGInlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
813         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes):
814         * rendering/svg/SVGInlineTextBox.cpp:
815         (WebCore::SVGInlineTextBox::dirtyOwnLineBoxes): Non-recursive part of dirtyLineBoxes()
816         (WebCore::SVGInlineTextBox::dirtyLineBoxes): Calls dirtyOwnLineBoxes() in a loop
817         * rendering/svg/SVGRootInlineBox.h:
818
819 2014-03-28  Andreas Kling  <akling@apple.com>
820
821         Rebaseline bindings tests.
822
823 2014-03-28  Michael Saboff  <msaboff@apple.com>
824
825         Unreviewed, rolling r166248 back in.
826
827         Turns out r166070 didn't cause a 2% performance loss in page load times
828
829         Reverted changeset:
830
831         Unreviewed, rolling out r166126.
832         Rollout r166126 in prepartion to roll out prerequisite r166070
833
834 2014-03-26  Antonio Gomes  <a1.gomes@sisa.samsung.com>
835
836         [Bindings] constants are always typed to 'int'
837         https://bugs.webkit.org/show_bug.cgi?id=130775
838
839         Reviewed by Darin Adler.
840
841         Patch fixes a bug where all constant getter generated
842         methods were returning 'integer' values due to static_cast.
843
844         Compilers should be smarth enough to properly infer which
845         jsNumber class construtor to call given a literal value.
846
847         Patch also fixes a bug where values whose representation
848         is bigger an integer maximum were overflowing. For instance,
849         NodeFilter.SHOW_ALL (0xFFFFFFFF).
850
851         Tests:
852         Binding tests updated.
853         Rebaselined fast/dom/constants.html
854
855         * bindings/scripts/CodeGeneratorJS.pm:
856         (GenerateImplementation):
857         * bindings/scripts/test/JS/JSTestInterface.cpp:
858         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
859         (WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
860         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT1):
861         (WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT2):
862         * bindings/scripts/test/JS/JSTestObj.cpp:
863         (WebCore::jsTestObjCONDITIONAL_CONST):
864         (WebCore::jsTestObjCONST_VALUE_0):
865         (WebCore::jsTestObjCONST_VALUE_1):
866         (WebCore::jsTestObjCONST_VALUE_2):
867         (WebCore::jsTestObjCONST_VALUE_4):
868         (WebCore::jsTestObjCONST_VALUE_8):
869         (WebCore::jsTestObjCONST_VALUE_9):
870         (WebCore::jsTestObjCONST_VALUE_11):
871         (WebCore::jsTestObjCONST_VALUE_12):
872         (WebCore::jsTestObjCONST_VALUE_13):
873         (WebCore::jsTestObjCONST_VALUE_14):
874         (WebCore::jsTestObjCONST_JAVASCRIPT):
875         (WebCore::jsTestObjReadonly):
876
877 2014-03-28  Myles C. Maxfield  <mmaxfield@apple.com>
878
879         A TrailingObject's endpoint might get decremented twice
880         https://bugs.webkit.org/show_bug.cgi?id=130874
881
882         Reviewed by Darin Adler.
883
884         There are two places where we might shave off a trailing space from the end
885         of a line. We don't want to hit both codepaths for a single line.
886
887         Fixes fast/block/update-midpoints-for-trailing-boxes-crash.html after r166245.
888
889         * rendering/line/BreakingContextInlineHeaders.h:
890         (WebCore::checkMidpoints):
891         (WebCore::BreakingContext::handleEndOfLine):
892
893 2014-03-28  Andreas Kling  <akling@apple.com>
894
895         Inline JSDOMWrapper subclasses' finishCreation().
896         <https://webkit.org/b/130890>
897
898         finishCreation() is really a no-op for JSDOMWrapper subclasses in
899         release builds. None of the ancestor classes do anything but assert
900         in their implementations.
901
902         Generate the function inline, reducing binary size, and removing
903         an unnecessary call from the JSFoo::create() helpers.
904
905         Reviewed by Sam Weinig.
906
907         * bindings/scripts/CodeGeneratorJS.pm:
908         (GenerateHeader):
909         (GenerateImplementation):
910
911 2014-03-28  Jer Noble  <jer.noble@apple.com>
912
913         [Mac] HLS streams will report an incorrect natural size.
914         https://bugs.webkit.org/show_bug.cgi?id=130859
915
916         Reviewed by Eric Carlson.
917
918         Some HLS streams will report incorrect naturalSizes due to the asset's preferredTransform
919         property not being  available at the same time as the track's natural size. Given that
920         AVFoundation only allows one video track to be selected at a time, simply use the asset's
921         presentation size, cached in m_cachedPresentation size in all cases.
922
923         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
924         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
925
926 2014-03-28  Antti Koivisto  <antti@apple.com>
927
928         Remove NodeListRootType flag
929         https://bugs.webkit.org/show_bug.cgi?id=130896
930
931         Reviewed by Anders Carlsson.
932
933         This can be handled statically (except for the RadioNodeList case) removing
934         a branch from NodeList traversal.
935
936         * dom/ClassNodeList.h:
937         * dom/Document.cpp:
938         (WebCore::Document::registerNodeListForInvalidation):
939         (WebCore::Document::unregisterNodeListForInvalidation):
940         (WebCore::Document::registerNodeList): Deleted.
941         (WebCore::Document::unregisterNodeList): Deleted.
942         
943             Mark document invalidation registered lists with a bit.
944             Renamed for clarity.
945
946         * dom/Document.h:
947         * dom/LiveNodeList.cpp:
948         (WebCore::LiveNodeList::LiveNodeList):
949         (WebCore::LiveNodeList::rootNode):
950         
951             Base class version that invokes virtual isRootedAtDocument. It is needed to support 
952             LiveNodeList::namedItem.
953
954         * dom/LiveNodeList.h:
955         (WebCore::LiveNodeList::isRegisteredForInvalidationAtDocument):
956         (WebCore::LiveNodeList::setRegisteredForInvalidationAtDocument):
957         (WebCore::LiveNodeList::document):
958         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
959         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
960         (WebCore::CachedLiveNodeList<NodeListType>::rootNode):
961         
962             Call isRootedAtDocument on the final leaf type. Except for RadioNodeList this
963             resolves statically.
964
965         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
966         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
967         (WebCore::LiveNodeList::isRootedAtDocument): Deleted.
968         (WebCore::LiveNodeList::rootType): Deleted.
969         (WebCore::LiveNodeList::rootNode): Deleted.
970         * dom/NameNodeList.h:
971         * dom/NodeRareData.h:
972         (WebCore::NodeListsNodeData::adoptDocument):
973         * dom/TagNodeList.h:
974         * html/HTMLCollection.cpp:
975         (WebCore::rootTypeFromCollectionType):
976         * html/HTMLCollection.h:
977         (WebCore::HTMLCollection::isRootedAtDocument):
978         (WebCore::HTMLCollection::rootType):
979         
980             HTMLCollections still needs the flag.
981
982         * html/LabelsNodeList.cpp:
983         (WebCore::LabelsNodeList::LabelsNodeList):
984         * html/LabelsNodeList.h:
985         * html/RadioNodeList.cpp:
986         (WebCore::RadioNodeList::RadioNodeList):
987         * html/RadioNodeList.h:
988
989 2014-03-28  Mario Sanchez Prada  <mario.prada@samsung.com>
990
991         [GTK] Geoclue2 providers won't work after reloading
992         https://bugs.webkit.org/show_bug.cgi?id=130898
993
994         Reviewed by Martin Robinson.
995
996         Don't reuse the Geoclue2 client proxy between different calls to
997         startPosition(), and create a new client proxy each time instead.
998
999         * platform/geoclue/GeolocationProviderGeoclue2.cpp:
1000         (GeolocationProviderGeoclue::startUpdating): Don't reuse the
1001         client proxy, by always calling geoclue_manager_call_get_client().
1002         (GeolocationProviderGeoclue::stopUpdating): Disconnect from the
1003         'location-updated' signal and dispose the client proxy.
1004
1005 2014-03-28  Diego Pino Garcia  <dpino@igalia.com>
1006
1007         [GTK] Too many redirects visiting www.globalforestwatch.org
1008         https://bugs.webkit.org/show_bug.cgi?id=129681
1009
1010         Reviewed by Martin Robinson.
1011
1012         * platform/gtk/UserAgentGtk.cpp:
1013         (WebCore::standardUserAgent): Append Safari version to UserAgent
1014         string.
1015
1016 2014-03-28  Michael Saboff  <msaboff@apple.com>
1017
1018         Unreviewed, rolling r166249 back in.
1019
1020         Turns out r166070 didn't cause a 2% performance loss in page load times
1021
1022         Reverted changeset:
1023
1024         Unreviewed, rolling out r166070.
1025         Rollout r166070 due to 2% performance loss in page load times
1026
1027 2014-03-28  James Craig  <jcraig@apple.com>
1028
1029         Web Inspector: Copy/paste error. EventListener block in DOM.json uses description from Node.
1030         https://bugs.webkit.org/show_bug.cgi?id=130158
1031
1032         Reviewed by Timothy Hatcher.
1033
1034         * inspector/protocol/DOM.json: Fixed a copy/paste annoyance.
1035
1036 2014-03-27  James Craig  <jcraig@apple.com>
1037
1038         Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
1039         https://bugs.webkit.org/show_bug.cgi?id=130827
1040
1041         Reviewed by Timothy Hatcher.
1042
1043         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1044
1045         Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.
1046
1047         * inspector/InspectorDOMAgent.cpp:
1048         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1049         * inspector/protocol/DOM.json:
1050
1051 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
1052
1053         Specify Shadow DOM Pseudo IDs in Media Element Constructors
1054         https://bugs.webkit.org/show_bug.cgi?id=130882
1055
1056         Reviewed by Eric Carlson.
1057
1058         * html/shadow/MediaControlElements.cpp:
1059         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Call setPseudoId in constructor.
1060         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement): Ditto.
1061         (WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
1062         (WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): Ditto.
1063         (WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
1064         (WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement): Ditto.
1065         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Ditto.
1066         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Ditto.
1067         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement): Ditto.
1068         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Ditto.
1069         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Ditto.
1070         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
1071         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
1072         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
1073         (WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement): Ditto.
1074         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Ditto.
1075         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
1076         (WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement): Ditto.
1077         (WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Ditto.
1078         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
1079         (WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Ditto.
1080         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Ditto.
1081         (WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Ditto.
1082         (WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Ditto.
1083         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Ditto.
1084
1085 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
1086
1087         [iOS][WK2] Adjust the tile coverage on the scrollview's edges
1088         https://bugs.webkit.org/show_bug.cgi?id=130884
1089
1090         Reviewed by Dan Bernstein.
1091
1092         * platform/ios/ScrollViewIOS.mm:
1093         (WebCore::ScrollView::computeCoverageRect):
1094         Pull back the future rect inside the contentRect if it goes outside.
1095         There is no point in retiling for rubberbanding and the extra tiles should be always be
1096         on the opposite side to the edges.
1097
1098 2014-03-27  Joseph Pecoraro  <pecoraro@apple.com>
1099
1100         Remove unused LocaleMac::create method
1101         https://bugs.webkit.org/show_bug.cgi?id=130870
1102
1103         Reviewed by Andreas Kling.
1104
1105         * platform/text/mac/LocaleMac.h:
1106         * platform/text/mac/LocaleMac.mm:
1107         (WebCore::LocaleMac::create): Deleted.
1108         (WebCore::LocaleMac::shortDateFormatter): Deleted.
1109
1110 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1111
1112         Clean up unneeded "mutable" keyword
1113         https://bugs.webkit.org/show_bug.cgi?id=130832
1114
1115         Reviewed by Andreas Kling.
1116
1117         As r166350, this patch cleans up unneeded "mutable" keywords.
1118         Additionally, m_validatedSelectionCache is removed because it is not used anywhere else.
1119
1120         * css/CSSFontFaceRule.h:
1121         * css/CSSStyleRule.h:
1122         * editing/FrameSelection.h:
1123
1124 2014-03-27  Enrica Casucci  <enrica@apple.com>
1125
1126         Add support for AirPlay picker in WK2 for iOS.
1127         https://bugs.webkit.org/show_bug.cgi?id=130855
1128         <rdar://problem/15349859>
1129
1130         Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.
1131
1132         Adds support in HTMLMediaSession to display the airplay picker
1133         and to monitor presence of available wireless targets.
1134
1135         * html/HTMLMediaSession.cpp:
1136         (WebCore::HTMLMediaSession::showPlaybackTargetPicker):
1137         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
1138         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
1139         * loader/EmptyClients.h:
1140         * page/ChromeClient.h:
1141         * platform/audio/MediaSessionManager.cpp:
1142         (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged):
1143         * platform/audio/MediaSessionManager.h:
1144         (WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
1145         (WebCore::MediaSessionManager::startMonitoringAirPlayRoutes):
1146         (WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes):
1147         * platform/audio/ios/MediaSessionManagerIOS.h:
1148         * platform/audio/ios/MediaSessionManagerIOS.mm:
1149         (WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
1150         (WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes):
1151         (WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes):
1152         (-[WebMediaSessionHelper initWithCallback:]):
1153         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
1154         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
1155         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
1156         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
1157         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1158         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
1159         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):
1160
1161 2014-03-27  Bem Jones-Bey  <bjonesbe@adobe.com>
1162
1163         [CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
1164         https://bugs.webkit.org/show_bug.cgi?id=127982
1165
1166         Reviewed by Simon Fraser.
1167
1168         Calculate rounded corners for box shapes as defined in the CSS Shapes
1169         spec.
1170
1171         Tests: css3/masking/clip-path-border-radius-border-box-000.html
1172                css3/masking/clip-path-border-radius-content-box-000.html
1173                css3/masking/clip-path-border-radius-content-box-001.html
1174                css3/masking/clip-path-border-radius-padding-box-000.html
1175                css3/masking/clip-path-border-radius-padding-box-001.html
1176                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html
1177                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html
1178                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html
1179                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html
1180                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html
1181                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html
1182                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html
1183                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html
1184                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html
1185                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html
1186                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html
1187                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html
1188                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html
1189                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html
1190                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html
1191                fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html
1192
1193         * platform/graphics/RoundedRect.h:
1194         (WebCore::RoundedRect::Radii::transposedRadii): Transpose radii for
1195             vertical writing modes.
1196         (WebCore::RoundedRect::moveBy): Add method for use with clip path.
1197         (WebCore::RoundedRect::transposedRect): Transpose rect for vertical
1198             writing modes.
1199         * rendering/RenderBox.h:
1200         (WebCore::RenderBox::marginBoxRect): Return the margin box rect for
1201             the RenderBox.
1202         * rendering/RenderLayer.cpp:
1203         (WebCore::RenderLayer::setupClipPath): Call the new function for the
1204             rounded corner calculation.
1205         * rendering/shapes/ShapeInfo.cpp:
1206         (WebCore::ShapeInfo<RenderType>::computedShape): Call the new function
1207             for the rounded corner calculation.
1208         * rendering/shapes/BoxShape.cpp:
1209         (WebCore::adjustRadiusForMarginBoxShape): Helper function for
1210             computeRoundedRectForLayoutBoxShape.
1211         (WebCore::computeMarginBoxShapeRadius): Ditto.
1212         (WebCore::computeMarginBoxShapeRadii): Ditto.
1213         (WebCore::computeRoundedRectForBoxShape): Utility function to do the
1214             rounded corner calculation.
1215         * rendering/shapes/BoxShape.h: Add new function.
1216         * rendering/style/RenderStyle.h:
1217         (WebCore::RenderStyle::getRoundedInnerBorderFor): Add default argument
1218             values.
1219
1220 2014-03-27  Commit Queue  <commit-queue@webkit.org>
1221
1222         Unreviewed, rolling out r166364.
1223         https://bugs.webkit.org/show_bug.cgi?id=130872
1224
1225         Caused a test assertion (Requested by smfr on #webkit).
1226
1227         Reverted changeset:
1228
1229         "Operator stretching: expose a math data API"
1230         https://bugs.webkit.org/show_bug.cgi?id=130572
1231         http://trac.webkit.org/changeset/166364
1232
1233 2014-03-27  Benjamin Poulain  <bpoulain@apple.com>
1234
1235         [iOS][WK2] Compute a good exposed rect when scaling WKContentView
1236         https://bugs.webkit.org/show_bug.cgi?id=130761
1237
1238         Reviewed by Simon Fraser.
1239
1240         * WebCore.exp.in:
1241         * platform/ScrollView.h:
1242         * platform/ios/ScrollViewIOS.mm:
1243         (WebCore::ScrollView::setScrollVelocity):
1244         (WebCore::ScrollView::computeCoverageRect):
1245         While scaling in, do not add margins tiles. When scaling out, add 1 margin tile size
1246         all around.
1247
1248 2014-03-27  Commit Queue  <commit-queue@webkit.org>
1249
1250         Unreviewed, rolling out r166360.
1251         https://bugs.webkit.org/show_bug.cgi?id=130869
1252
1253         Seems to have broken PLT (Requested by ap on #webkit).
1254
1255         Reverted changeset:
1256
1257         "Connection::dispatchOneMessage() can be re-entered while
1258         handling Cmd-key menu"
1259         https://bugs.webkit.org/show_bug.cgi?id=130767
1260         http://trac.webkit.org/changeset/166360
1261
1262 2014-03-27  Antti Koivisto  <antti@apple.com>
1263
1264         Remove LiveNodeList::Type
1265         https://bugs.webkit.org/show_bug.cgi?id=130866
1266
1267         Reviewed by Andreas Kling.
1268
1269         We don't need dynamic type information anymore.
1270
1271         * dom/ClassNodeList.cpp:
1272         (WebCore::ClassNodeList::ClassNodeList):
1273         * dom/ContainerNode.cpp:
1274         (WebCore::ContainerNode::getElementsByTagName):
1275         (WebCore::ContainerNode::getElementsByName):
1276         (WebCore::ContainerNode::getElementsByClassName):
1277         (WebCore::ContainerNode::radioNodeList):
1278         * dom/LiveNodeList.cpp:
1279         (WebCore::LiveNodeList::LiveNodeList):
1280         * dom/LiveNodeList.h:
1281         (WebCore::LiveNodeList::invalidationType):
1282         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
1283         (WebCore::LiveNodeList::type): Deleted.
1284         * dom/NameNodeList.cpp:
1285         (WebCore::NameNodeList::NameNodeList):
1286         (WebCore::NameNodeList::nodeMatches): Deleted.
1287         * dom/NameNodeList.h:
1288         (WebCore::NameNodeList::nodeMatches):
1289         * dom/NodeRareData.h:
1290         (WebCore::NodeListTypeIdentifier<ClassNodeList>::value):
1291         (WebCore::NodeListTypeIdentifier<NameNodeList>::value):
1292         (WebCore::NodeListTypeIdentifier<TagNodeList>::value):
1293         (WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
1294         (WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
1295         (WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):
1296         
1297             Get unique id from type for key generation purposes only.
1298
1299         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1300         (WebCore::NodeListsNodeData::addCacheWithName):
1301         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
1302         (WebCore::NodeListsNodeData::removeCacheWithName):
1303         (WebCore::NodeListsNodeData::namedNodeListKey):
1304         * dom/TagNodeList.cpp:
1305         (WebCore::TagNodeList::TagNodeList):
1306         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
1307         * dom/TagNodeList.h:
1308         * html/LabelableElement.cpp:
1309         (WebCore::LabelableElement::labels):
1310         * html/LabelsNodeList.cpp:
1311         (WebCore::LabelsNodeList::LabelsNodeList):
1312         * html/LabelsNodeList.h:
1313         * html/RadioNodeList.cpp:
1314         (WebCore::RadioNodeList::RadioNodeList):
1315         * html/RadioNodeList.h:
1316
1317 2014-03-27  Simon Fraser  <simon.fraser@apple.com>
1318
1319         Fix crash when RenderView is cleared inside of frame flattening layout
1320         https://bugs.webkit.org/show_bug.cgi?id=130864
1321
1322         Reviewed by Dan Bernstein.
1323         
1324         Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
1325         sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
1326         our frame's RenderView would be null after doing a layout from the root frame,
1327         possibly also when WebCore was being re-entered from another thread.
1328         
1329         Add a null check to fix this.
1330         
1331         Crash was timing-dependent and hard to test.
1332
1333         * page/FrameView.cpp:
1334         (WebCore::FrameView::layout):
1335
1336 2014-03-27  Antti Koivisto  <antti@apple.com>
1337
1338         Remove some unnecessary branches from LiveNodeList traversal
1339         https://bugs.webkit.org/show_bug.cgi?id=130854
1340
1341         Reviewed by Andreas Kling.
1342
1343         Compile different traversal code paths for all NodeList subclasses.
1344
1345         * dom/ClassNodeList.cpp:
1346         (WebCore::ClassNodeList::ClassNodeList):
1347         (WebCore::ClassNodeList::~ClassNodeList):
1348         (WebCore::ClassNodeList::nodeMatches): Deleted.
1349         * dom/ClassNodeList.h:
1350         (WebCore::ClassNodeList::nodeMatches):
1351         (WebCore::ClassNodeList::nodeMatchesInlined): Deleted.
1352         
1353             Remove separate nodeMatchesInlined functions. 
1354             We now rely on exact types and marking classes final.
1355
1356         * dom/LiveNodeList.cpp:
1357         (WebCore::LiveNodeList::LiveNodeList):
1358         (WebCore::LiveNodeList::~LiveNodeList):
1359         (WebCore::LiveNodeList::namedItem):
1360         (WebCore::LiveNodeList::rootNode): Deleted.
1361         (WebCore::isMatchingElement): Deleted.
1362         (WebCore::firstMatchingElement): Deleted.
1363         (WebCore::lastMatchingElement): Deleted.
1364         (WebCore::nextMatchingElement): Deleted.
1365         (WebCore::previousMatchingElement): Deleted.
1366         (WebCore::traverseMatchingElementsForward): Deleted.
1367         (WebCore::traverseMatchingElementsBackward): Deleted.
1368         (WebCore::LiveNodeList::collectionFirst): Deleted.
1369         (WebCore::LiveNodeList::collectionLast): Deleted.
1370         (WebCore::LiveNodeList::collectionTraverseForward): Deleted.
1371         (WebCore::LiveNodeList::collectionTraverseBackward): Deleted.
1372         (WebCore::LiveNodeList::length): Deleted.
1373         (WebCore::LiveNodeList::item): Deleted.
1374         (WebCore::LiveNodeList::memoryCost): Deleted.
1375         (WebCore::LiveNodeList::invalidateCache): Deleted.
1376         * dom/LiveNodeList.h:
1377         (WebCore::LiveNodeList::invalidateCacheForAttribute):
1378         (WebCore::CachedLiveNodeList::collectionCanTraverseBackward):
1379         (WebCore::LiveNodeList::rootNode):
1380         (WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
1381         
1382             Add CachedLiveNodeList<NodeListType> utility type that interfaces with CollectionIndexCache.
1383             It is the base class for all concrete LiveNodeLists.
1384
1385         (WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
1386         (WebCore::CachedLiveNodeList<NodeListType>::collectionFirst):
1387         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
1388         (WebCore::nextMatchingElement):
1389         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
1390         (WebCore::previousMatchingElement):
1391         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
1392         (WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
1393         (WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
1394         (WebCore::CachedLiveNodeList<NodeListType>::length):
1395         (WebCore::CachedLiveNodeList<NodeListType>::item):
1396         (WebCore::CachedLiveNodeList<NodeListType>::memoryCost):
1397         
1398             Templated code moves to header.
1399
1400         (WebCore::LiveNodeList::LiveNodeList): Deleted.
1401         (WebCore::LiveNodeList::~LiveNodeList): Deleted.
1402         (WebCore::LiveNodeList::invalidateCache): Deleted.
1403         (WebCore::LiveNodeList::collectionCanTraverseBackward): Deleted.
1404         (WebCore::LiveNodeList::willValidateIndexCache): Deleted.
1405         * dom/NameNodeList.cpp:
1406         (WebCore::NameNodeList::NameNodeList):
1407         * dom/NameNodeList.h:
1408         * dom/Node.cpp:
1409         (WebCore::Document::invalidateNodeListAndCollectionCaches):
1410         (WebCore::NodeListsNodeData::invalidateCaches):
1411         * dom/TagNodeList.cpp:
1412         (WebCore::TagNodeList::TagNodeList):
1413         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
1414         (WebCore::HTMLTagNodeList::~HTMLTagNodeList):
1415         (WebCore::TagNodeList::nodeMatches): Deleted.
1416         (WebCore::HTMLTagNodeList::nodeMatches): Deleted.
1417         * dom/TagNodeList.h:
1418         (WebCore::TagNodeList::nodeMatches):
1419         (WebCore::HTMLTagNodeList::nodeMatches):
1420         (WebCore::TagNodeList::create): Deleted.
1421         (WebCore::HTMLTagNodeList::nodeMatchesInlined): Deleted.
1422         * html/LabelsNodeList.cpp:
1423         (WebCore::LabelsNodeList::LabelsNodeList):
1424         * html/LabelsNodeList.h:
1425         * html/RadioNodeList.cpp:
1426         (WebCore::RadioNodeList::RadioNodeList):
1427         * html/RadioNodeList.h:
1428
1429 2014-03-27  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1430
1431         Remove comment from Filter.h
1432         https://bugs.webkit.org/show_bug.cgi?id=130848
1433
1434         Reviewed by Simon Fraser.
1435
1436         Exploring the use of consts on applyScale() methods didn't yield
1437         good results.
1438
1439         No new tests, no change on behavior.
1440
1441         * platform/graphics/filters/Filter.h:
1442
1443 2014-03-27  Frédéric Wang  <fred.wang@free.fr>
1444
1445         Operator stretching: expose a math data API
1446         https://bugs.webkit.org/show_bug.cgi?id=130572
1447
1448         Reviewed by Chris Fleizach.
1449
1450         We expose a new SimpleFontData API to give access to the data from the
1451         OpenType MATH table using a font cache. The class OpenTypeMathData will
1452         be implemented in bug 130324. On Darwin platform, we also implement the
1453         missing FontPlatformData::openTypeTable function which will be necessary
1454         to load the OpenType MATH table. The changes are intended to be used
1455         for MathML operator stretching (bug 130322) so tests are not added yet.
1456
1457         * CMakeLists.txt: add new OpenTypeMathData files.
1458         * WebCore.vcxproj/WebCore.vcxproj: ditto.
1459         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
1460         * WebCore.xcodeproj/project.pbxproj: ditto.
1461         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
1462         We make the math and vertical data share the same key for the cache.
1463         (WebCore::fontMathDataCacheInstance):
1464         (WebCore::FontCache::getMathData):
1465         (WebCore::fontVerticalDataCacheInstance):
1466         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
1467         * platform/graphics/FontPlatformData.cpp:
1468         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
1469         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
1470         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
1471         (WebCore::SimpleFontData::SimpleFontData):
1472         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
1473         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
1474         (WebCore::OpenTypeMathData::OpenTypeMathData):
1475         * platform/graphics/opentype/OpenTypeMathData.h: Added.
1476         (WebCore::OpenTypeMathData::create):
1477         (WebCore::OpenTypeMathData::hasMathData):
1478
1479 2014-03-27  Brent Fulgham  <bfulgham@apple.com>
1480
1481         Fix a crash caused by track insertion after load()
1482         https://bugs.webkit.org/show_bug.cgi?id=130777
1483
1484         Reviewed by Eric Carlson.
1485
1486         Test: media/track/track-insert-after-load-crash.html
1487
1488         Based on the Blink change (patch by acolwell@chromium.org):
1489         https://codereview.chromium.org/211373009/
1490
1491         * html/HTMLMediaElement.cpp:
1492         (WebCore::HTMLMediaElement::parseAttribute): Remove stale LoadMediaResource flag after explicit load.
1493
1494 2014-03-27  Alexey Proskuryakov  <ap@apple.com>
1495
1496         Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
1497         equivalents, ASSERT(!_data->_keyDownEventBeingResent)
1498         https://bugs.webkit.org/show_bug.cgi?id=130767
1499         <rdar://problem/16307487>
1500
1501         Added a wrapper for RunLoop::initializeMainThread that also adds modal run loop
1502         mode to it on Mac.
1503
1504         * CMakeLists.txt:
1505         * WebCore.exp.in:
1506         * WebCore.vcxproj/WebCore.vcxproj:
1507         * WebCore.vcxproj/WebCore.vcxproj.filters:
1508         * WebCore.xcodeproj/project.pbxproj:
1509         * platform/MainRunLoop.cpp: Added.
1510         (WebCore::initializeMainRunLoop):
1511         * platform/MainRunLoop.h: Added.
1512         * platform/mac/MainRunLoop.mm: Added.
1513         (WebCore::initializeMainRunLoop):
1514
1515 2014-03-27  Krzysztof Czech  <k.czech@samsung.com>
1516
1517         AX: Returns const reference to static string.
1518         https://bugs.webkit.org/show_bug.cgi?id=130835
1519
1520         Reviewed by Mario Sanchez Prada.
1521
1522         Avoiding some unnecessary copies by returning const reference to static string.
1523
1524         No new tests. No behaviour change.
1525
1526         * accessibility/AccessibilityMediaControls.cpp:
1527         (WebCore::AccessibilityMediaControl::controlTypeName):
1528         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
1529         * accessibility/AccessibilityMediaControls.h:
1530
1531 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
1532
1533         [CSSRegions] Rename inNamedFlow flag to isNamedFlowContentNode flag
1534         https://bugs.webkit.org/show_bug.cgi?id=130731
1535
1536         Reviewed by Andrei Bucur.
1537
1538         Currently, the inNamedFlow flag in Node class tells if a node is a content node, one that has a style with flow-into.
1539         Since it is used only for those nodes and not propagated through hierarchy, i want to renamed it to a more meaningful name.
1540         No new functionality, no new tests.
1541
1542         * dom/ContainerNode.cpp:
1543         (WebCore::destroyRenderTreeIfNeeded):
1544         * dom/Element.cpp:
1545         (WebCore::Element::~Element):
1546         (WebCore::Element::unregisterNamedFlowContentElement):
1547         * dom/Node.h:
1548         (WebCore::Node::isNamedFlowContentNode):
1549         (WebCore::Node::setIsNamedFlowContentNode):
1550         (WebCore::Node::clearIsNamedFlowContentNode):
1551         * rendering/RenderNamedFlowThread.cpp:
1552         (WebCore::RenderNamedFlowThread::clearContentElements):
1553         (WebCore::RenderNamedFlowThread::registerNamedFlowContentElement):
1554         (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentElement):
1555         (WebCore::nextNodeInsideContentElement):
1556         * style/StyleResolveTree.cpp:
1557         (WebCore::Style::attachChildren):
1558         (WebCore::Style::resolveLocal):
1559
1560 2014-03-27  Mihnea Ovidenie  <mihnea@adobe.com>
1561
1562         [CSSRegions] Crash when cloning a region child with a content node child
1563         https://bugs.webkit.org/show_bug.cgi?id=129811
1564
1565         Reviewed by David Hyatt.
1566
1567         Collecting the children of a region in another named flow will be supported
1568         again in the future and it will be revisited when we will implement the content
1569         keyword: http://dev.w3.org/csswg/css-regions-1/#the-flow-into-property.
1570         Remove the support for now as it introduces unnecessary complexity in the code
1571         and potential wrong behavior.
1572
1573         Test: fast/regions/region-content-node-child-clone-crash.html
1574
1575         * dom/Element.cpp:
1576         (WebCore::Element::shouldMoveToFlowThread):
1577         (WebCore::Element::clearStyleDerivedDataBeforeDetachingRenderer):
1578         * dom/Element.h:
1579         * dom/ElementRareData.h:
1580         (WebCore::ElementRareData::ElementRareData):
1581         * rendering/FlowThreadController.cpp:
1582         * rendering/FlowThreadController.h:
1583         * style/StyleResolveTree.cpp:
1584         (WebCore::Style::moveToFlowThreadIfNeeded):
1585         (WebCore::Style::createRendererIfNeeded):
1586
1587 2014-03-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1588
1589         Remove unneeded mutable keyword in some member variables 
1590         https://bugs.webkit.org/show_bug.cgi?id=130813
1591
1592         Reviewed by Andreas Kling.
1593
1594         Some member variables have mutable keyword though they don't used by const function.
1595         This patch removes them. 
1596
1597         No new tests, no behavior changes. Just clean up.
1598
1599         * storage/StorageAreaSync.h:
1600         * svg/animation/SVGSMILElement.h:
1601
1602 2014-03-27  Commit Queue  <commit-queue@webkit.org>
1603
1604         Unreviewed, rolling out r166296 and r166331.
1605         https://bugs.webkit.org/show_bug.cgi?id=130822
1606
1607         caused some crashes and frequent assertion failures, and the
1608         fix is going to take a little while (Requested by thorton on
1609         #webkit).
1610
1611         Reverted changesets:
1612
1613         "[iOS WebKit2] Flush all surfaces after painting into all of
1614         them, instead of after painting into each one"
1615         https://bugs.webkit.org/show_bug.cgi?id=130768
1616         http://trac.webkit.org/changeset/166296
1617
1618         "Assertion failure in RemoteLayerBackingStore::flush"
1619         https://bugs.webkit.org/show_bug.cgi?id=130810
1620         http://trac.webkit.org/changeset/166331
1621
1622 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1623
1624         Fix failing scrolling tests by reverting to previous behavior where
1625         the scrolling geometry for the main frame scrolling node was only
1626         updated from frameViewLayoutUpdated() and no-where else.
1627
1628         * WebCore.exp.in:
1629         * page/scrolling/AsyncScrollingCoordinator.cpp:
1630         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
1631         * page/scrolling/AsyncScrollingCoordinator.h:
1632         * page/scrolling/ScrollingCoordinator.h:
1633         (WebCore::ScrollingCoordinator::updateScrollingNode):
1634         * rendering/RenderLayerCompositor.cpp:
1635         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1636         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): Deleted.
1637
1638 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
1639
1640         HTMLConverter::_processText is slow because it walks up ancestor elements
1641         https://bugs.webkit.org/show_bug.cgi?id=130820
1642
1643         Reviewed by Sam Weinig.
1644
1645         Avoid walking up the tree from each text node by caching the aggregated attributed strings for each element.
1646         Also compute the attributed strings top-down to avoid calling mutableCopy in every iteration. 
1647
1648         This reduces the runtime of Interactive/CopyAll.html from 15s to 13s (15%).
1649
1650         * editing/cocoa/HTMLConverter.mm:
1651         (HTMLConverter::_attributesForElement):
1652         (HTMLConverter::attributesForElement):
1653         (HTMLConverter::aggregatedAttributesForAncestors):
1654         (HTMLConverter::_processText):
1655
1656 2014-03-26  Sam Weinig  <sam@webkit.org>
1657
1658         Fix iOS build.
1659
1660         * editing/cocoa/HTMLConverter.mm:
1661         (_font):
1662
1663 2014-03-26  Ryosuke Niwa  <rniwa@webkit.org>
1664
1665         Make _processText and _traverseNode in HTMLConverter more efficient
1666         https://bugs.webkit.org/show_bug.cgi?id=130769
1667
1668         Reviewed by Sam Weinig.
1669
1670         Rewrote a bunch of code in C++ and avoided creating wrappers.
1671         This reduces the runtime of Interactive/CopyAll.html from ~16.5s to 15s.
1672
1673         * editing/cocoa/HTMLConverter.mm:
1674         (HTMLConverterCaches::isAncestorsOfStartToBeConverted):
1675         (HTMLConverter::HTMLConverter):
1676         (HTMLConverter::~HTMLConverter):
1677         (HTMLConverter::_processElement):
1678         (HTMLConverter::_processText):
1679         (HTMLConverter::_traverseNode):
1680         (HTMLConverter::_traverseFooterNode):
1681         (HTMLConverterCaches::cacheAncestorsOfStartToBeConverted):
1682         (HTMLConverter::_loadFromDOMRange):
1683
1684 2014-03-26  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1685
1686         FEGaussianBlur: unify and const-ify calculateKernelSize
1687         https://bugs.webkit.org/show_bug.cgi?id=130779
1688
1689         Some methods can benefit of using const refs as also make sense to
1690         unify the interface (i.e. parameters) in calculateKernelSize/Unscaled.
1691
1692         FilterEffect::filter() will now return a reference, which helps since
1693         its descendants were accessing methods into the pointer without testing
1694         for it.
1695
1696         Reviewed by Simon Fraser.
1697
1698         No new tests, no changes on behavior.
1699
1700         * platform/graphics/filters/FEDisplacementMap.cpp:
1701         (WebCore::FEDisplacementMap::platformApplySoftware):
1702         * platform/graphics/filters/FEDropShadow.cpp:
1703         (WebCore::FEDropShadow::determineAbsolutePaintRect):
1704         (WebCore::FEDropShadow::platformApplySoftware):
1705         * platform/graphics/filters/FEGaussianBlur.cpp:
1706         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
1707         (WebCore::FEGaussianBlur::calculateKernelSize):
1708         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
1709         (WebCore::FEGaussianBlur::platformApplySoftware):
1710         * platform/graphics/filters/FEGaussianBlur.h:
1711         * platform/graphics/filters/FEMorphology.cpp:
1712         (WebCore::FEMorphology::determineAbsolutePaintRect):
1713         (WebCore::FEMorphology::platformApplySoftware):
1714         * platform/graphics/filters/FEOffset.cpp:
1715         (WebCore::FEOffset::determineAbsolutePaintRect):
1716         (WebCore::FEOffset::platformApplySoftware):
1717         * platform/graphics/filters/FETile.cpp:
1718         (WebCore::FETile::platformApplySoftware):
1719         * platform/graphics/filters/FETurbulence.cpp:
1720         (WebCore::FETurbulence::fillRegion):
1721         * platform/graphics/filters/Filter.h:
1722         (WebCore::Filter::applyHorizontalScale):
1723         (WebCore::Filter::applyVerticalScale):
1724         * platform/graphics/filters/FilterEffect.h:
1725         (WebCore::FilterEffect::filter):
1726         * platform/graphics/filters/SourceAlpha.cpp:
1727         (WebCore::SourceAlpha::determineAbsolutePaintRect):
1728         (WebCore::SourceAlpha::platformApplySoftware):
1729         * platform/graphics/filters/SourceGraphic.cpp:
1730         (WebCore::SourceGraphic::determineAbsolutePaintRect):
1731         (WebCore::SourceGraphic::platformApplySoftware):
1732         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
1733         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
1734         * svg/graphics/filters/SVGFEImage.cpp:
1735         (WebCore::FEImage::determineAbsolutePaintRect):
1736         (WebCore::FEImage::platformApplySoftware):
1737
1738 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1739
1740         Make sure childContainmentLayer is parented
1741         https://bugs.webkit.org/show_bug.cgi?id=130808
1742
1743         Reviewed by Tim Horton.
1744
1745         m_childContainmentLayer was never parented if the page
1746         created no other compositing layers, which left a dangling
1747         GraphicsLayer which in turn confused UI-side compositing a little.
1748         Fix by always parenting this layer.
1749
1750         * rendering/RenderLayerBacking.cpp:
1751         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1752
1753 2014-03-26  Brian Burg  <bburg@apple.com>
1754
1755         Web Replay: disable page cache during capture/replay
1756         https://bugs.webkit.org/show_bug.cgi?id=130672
1757
1758         Reviewed by Timothy Hatcher.
1759
1760         Save, set, and restore page cache settings at the correct times.
1761
1762         No new tests. If this code fails, then the tests for network replay will fail.
1763
1764         * replay/ReplayController.cpp:
1765         (WebCore::ReplayController::setForceDeterministicSettings): Added.
1766         (WebCore::ReplayController::startCapturing):
1767         (WebCore::ReplayController::stopCapturing):
1768         (WebCore::ReplayController::cancelPlayback):
1769         (WebCore::ReplayController::replayToPosition):
1770         * replay/ReplayController.h:
1771
1772 2014-03-26  Sam Weinig  <sam@webkit.org>
1773
1774         Convert more of HTMLConverter to C++
1775         https://bugs.webkit.org/show_bug.cgi?id=130811
1776
1777         Reviewed by Anders Carlsson.
1778
1779         * editing/cocoa/HTMLConverter.mm:
1780         (HTMLConverter::HTMLConverter):
1781         (HTMLConverter::~HTMLConverter):
1782         (HTMLConverter::_blockLevelElementForNode):
1783         (HTMLConverter::_colorForElement):
1784         (HTMLConverter::_computedAttributesForElement):
1785         (HTMLConverter::_attributesForElement):
1786         (HTMLConverter::_fillInBlock):
1787         (HTMLConverter::_enterElement):
1788         (HTMLConverter::_addTableForElement):
1789         (HTMLConverter::_addTableCellForElement):
1790         (HTMLConverter::_processElement):
1791         (HTMLConverter::_exitElement):
1792         (HTMLConverter::_getFloat): Deleted.
1793         (HTMLConverter::_elementIsBlockLevel): Deleted.
1794         (HTMLConverter::_elementHasOwnBackgroundColor): Deleted.
1795         (HTMLConverter::_colorForNode): Deleted.
1796
1797 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
1798
1799         Hook up -webkit-overflow-scrolling:touch for iOS WK2
1800         https://bugs.webkit.org/show_bug.cgi?id=130809
1801
1802         Reviewed by Tim Horton.
1803
1804         Get -webkit-overflow-scrolling: touch working for iOS WK2.
1805         
1806         * WebCore.exp.in:
1807         * page/scrolling/AsyncScrollingCoordinator.cpp:
1808         (WebCore::AsyncScrollingCoordinator::updateScrollingNode):
1809         Send in ScrollingGeometry when we update scrolling nodes.
1810         * page/scrolling/AsyncScrollingCoordinator.h:
1811         * page/scrolling/ScrollingCoordinator.h:
1812         (WebCore::ScrollingCoordinator::updateScrollingNode):
1813         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
1814         Need to get to the scrolling layer in a subclass.
1815         (WebCore::ScrollingTreeScrollingNodeIOS::scrollLayer):
1816         * rendering/RenderLayer.cpp:
1817         (WebCore::RenderLayer::hasAcceleratedTouchScrolling): Remove code
1818         that temporarily disabled touch-scrolling.
1819         * rendering/RenderLayerCompositor.cpp:
1820         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): When we
1821         update scrolling nodes, send in the right scrolling geometry.
1822
1823 2014-03-26  Timothy Hatcher  <timothy@apple.com>
1824
1825         Modernize the loops in InspectorPageAgent.cpp.
1826
1827         Also moves the check for hiddenFromInspector to a lower level.
1828         This hides hidden resources from more places.
1829
1830         https://bugs.webkit.org/show_bug.cgi?id=130803
1831
1832         Reviewed by Joseph Pecoraro.
1833
1834         * inspector/InspectorPageAgent.cpp:
1835         (WebCore::buildArrayForCookies):
1836         (WebCore::cachedResourcesForFrame):
1837         (WebCore::allResourcesURLsForFrame):
1838         (WebCore::InspectorPageAgent::getCookies):
1839         (WebCore::InspectorPageAgent::searchInResources):
1840         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
1841         (WebCore::InspectorPageAgent::loaderDetachedFromFrame):
1842         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1843
1844 2014-03-26  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
1845
1846         Add platform implementation for RTCOfferAnswerOptions and RTCOfferOptions
1847         https://bugs.webkit.org/show_bug.cgi?id=130689
1848
1849         Reviewed by Eric Carlson.
1850
1851         RTCOfferAnswerOptions and RTCOfferOptions objects were being passed to platform class, causing a layer
1852         violation.
1853
1854         * Modules/mediastream/RTCOfferAnswerOptions.cpp:
1855         (WebCore::RTCOfferAnswerOptions::initialize):
1856         (WebCore::RTCOfferOptions::initialize):
1857         * Modules/mediastream/RTCOfferAnswerOptions.h:
1858         (WebCore::RTCOfferAnswerOptions::requestIdentity):
1859         (WebCore::RTCOfferAnswerOptions::privateOfferAnswerOptions):
1860         (WebCore::RTCOfferAnswerOptions::RTCOfferAnswerOptions):
1861         (WebCore::RTCOfferOptions::offerToReceiveVideo):
1862         (WebCore::RTCOfferOptions::offerToReceiveAudio):
1863         (WebCore::RTCOfferOptions::voiceActivityDetection):
1864         (WebCore::RTCOfferOptions::iceRestart):
1865         (WebCore::RTCOfferOptions::privateOfferOptions):
1866         (WebCore::RTCOfferOptions::RTCOfferOptions):
1867         * Modules/mediastream/RTCPeerConnection.cpp:
1868         (WebCore::RTCPeerConnection::createOffer):
1869         (WebCore::RTCPeerConnection::createAnswer):
1870         * platform/mediastream/RTCOfferAnswerOptionsPrivate.h: Added.
1871         * platform/mediastream/RTCPeerConnectionHandler.h:
1872         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
1873         (WebCore::RTCPeerConnectionHandlerMock::createOffer):
1874         (WebCore::RTCPeerConnectionHandlerMock::createAnswer):
1875         * platform/mock/RTCPeerConnectionHandlerMock.h:
1876
1877 2014-03-26  Zalan Bujtas  <zalan@apple.com>
1878
1879         Device scale factor should always be greater than 0.
1880         https://bugs.webkit.org/show_bug.cgi?id=130798
1881
1882         Reviewed by David Kilzer.
1883
1884         Rendering context requires a device scale factor > 0 so that we can map CSS pixels
1885         to device pixels properly. Neither 0 nor a negative device pixel ratio are considered to be valid.
1886
1887         * page/Page.cpp:
1888         (WebCore::Page::setDeviceScaleFactor):
1889
1890 2014-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
1891
1892         Skipping underlines disregard points completely inside the underline rect
1893         https://bugs.webkit.org/show_bug.cgi?id=130800
1894
1895         Reviewed by Dean Jackson.
1896
1897         When determining bounds for underline skipping, endpoints of glyph contours
1898         that lie entirely within the rect of the underline are ignored. This patch
1899         makes these points affect the skipping regions the same way that intersections
1900         do.
1901
1902         Test: fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html
1903
1904         * platform/graphics/mac/FontMac.mm:
1905         (WebCore::updateX): Refactored common code into a function
1906         (WebCore::findPathIntersections): Test for endpoints which lie entirely within
1907         the underline bounds
1908
1909 2014-03-26  Pratik Solanki  <psolanki@apple.com>
1910
1911         Unreviewed. iOS build fix after r166312. Soft link CMTimeRangeGetEnd.
1912
1913         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1914
1915 2014-03-26  Timothy Hatcher  <timothy@apple.com>
1916
1917         Propagate the hiddenFromInspector flag on ResourceRequest in
1918         places when a new request a made or passed between processes.
1919
1920         https://bugs.webkit.org/show_bug.cgi?id=130741
1921
1922         Reviewed by Joseph Pecoraro.
1923
1924         * WebCore.exp.in: Updated symbols for updateFromDelegatePreservingOldProperties.
1925         * platform/network/cf/ResourceRequest.h:
1926         * platform/network/cf/ResourceRequestCFNet.cpp:
1927         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
1928         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
1929         * platform/network/curl/ResourceRequest.h:
1930         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
1931         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
1932         * platform/network/mac/ResourceRequestMac.mm:
1933         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
1934         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
1935         * platform/network/soup/ResourceRequest.h:
1936         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Added.
1937         (WebCore::ResourceRequest::updateFromDelegatePreservingOldHTTPBody): Deleted.
1938
1939 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
1940
1941         [CSS Shapes] Remove no-longer-used shape-inside geometry code
1942         https://bugs.webkit.org/show_bug.cgi?id=130740
1943
1944         Reviewed by David Hyatt.
1945
1946         This patch removes shape-padding support, since it can be used only with shape-inside.
1947         Shape-inside support has been removed in r166301.
1948
1949         No new tests needed, existing tests have been removed by r166301.
1950
1951         * rendering/shapes/BoxShape.cpp:
1952         (WebCore::BoxShape::shapePaddingLogicalBoundingBox): Deleted.
1953         (WebCore::BoxShape::shapePaddingBounds): Deleted.
1954         (WebCore::BoxShape::getIncludedIntervals): Deleted.
1955         (WebCore::BoxShape::firstIncludedIntervalLogicalTop): Deleted.
1956         * rendering/shapes/BoxShape.h:
1957         * rendering/shapes/PolygonShape.cpp:
1958         (WebCore::leftSide): Deleted.
1959         (WebCore::isReflexVertex): Deleted.
1960         (WebCore::computeShapePaddingBounds): Deleted.
1961         (WebCore::PolygonShape::shapePaddingBounds): Deleted.
1962         (WebCore::PolygonShape::getIncludedIntervals): Deleted.
1963         (WebCore::firstFitRectInPolygon): Deleted.
1964         (WebCore::aboveOrToTheLeft): Deleted.
1965         (WebCore::PolygonShape::firstIncludedIntervalLogicalTop): Deleted.
1966         * rendering/shapes/PolygonShape.h:
1967         (WebCore::PolygonShape::PolygonShape):
1968         * rendering/shapes/RasterShape.cpp:
1969         (WebCore::RasterShapeIntervals::firstIncludedIntervalY): Deleted.
1970         (WebCore::RasterShapeIntervals::getIncludedIntervals): Deleted.
1971         (WebCore::RasterShape::paddingIntervals): Deleted.
1972         (WebCore::RasterShape::getIncludedIntervals): Deleted.
1973         (WebCore::RasterShape::firstIncludedIntervalLogicalTop): Deleted.
1974         * rendering/shapes/RasterShape.h:
1975         * rendering/shapes/RectangleShape.cpp:
1976         (WebCore::ellipseYIntercept): Deleted.
1977         (WebCore::RectangleShape::shapePaddingBounds): Deleted.
1978         (WebCore::RectangleShape::getIncludedIntervals): Deleted.
1979         (WebCore::cornerInterceptForWidth): Deleted.
1980         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop): Deleted.
1981         * rendering/shapes/RectangleShape.h:
1982         * rendering/shapes/Shape.cpp:
1983         (WebCore::Shape::createShape):
1984         (WebCore::Shape::createRasterShape):
1985         (WebCore::Shape::createBoxShape):
1986         * rendering/shapes/Shape.h:
1987         (WebCore::Shape::lineOverlapsShapePaddingBounds): Deleted.
1988         (WebCore::Shape::shapePadding): Deleted.
1989         * rendering/shapes/ShapeInfo.cpp:
1990         (WebCore::ShapeInfo<RenderType>::computedShape):
1991         * rendering/style/RenderStyle.cpp:
1992         (WebCore::RenderStyle::changeRequiresLayout):
1993         * rendering/style/RenderStyle.h:
1994         * rendering/style/StyleRareNonInheritedData.cpp:
1995         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1996         (WebCore::StyleRareNonInheritedData::operator==):
1997         * rendering/style/StyleRareNonInheritedData.h:
1998
1999 2014-03-26  Jeremy Jones  <jeremyj@apple.com>
2000
2001         Implement hasLiveStreamingContent property in WebAVPlayerController
2002         https://bugs.webkit.org/show_bug.cgi?id=128684
2003
2004         Reviewed by Simon Fraser.
2005
2006         * WebCore.exp.in:
2007         Add export for WebVideoFullscreenInterfaceAVKit::setSeekableRanges().
2008
2009         * platform/ios/WebVideoFullscreenInterface.h:
2010         Add setSeekableRanges()
2011
2012         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2013         Add setSeekableRanges()
2014
2015         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2016         Remove vestigial playerLayer property. Add seekableTimeRanges property.
2017
2018         (-[WebAVPlayerController dealloc]):
2019         Release _seekableTimeRanges.
2020         Remove references to _playerLayer.
2021
2022         (-[WebAVPlayerController hasLiveStreamingContent]):
2023         Implement based on duration. Live stream has an infinite duration.
2024
2025         (+[WebAVPlayerController keyPathsForValuesAffectingHasLiveStreamingContent]):
2026         Describe dependent keys for computed property hasLiveStreamingContent.
2027
2028         (-[WebAVPlayerController skipBackwardThirtySeconds:]):
2029         Seek back 30 seconds if that time is in the seekable ranges.
2030
2031         (-[WebAVPlayerController gotoEndOfSeekableRanges:]):
2032         Jump to live by going to the of the seekable ranges.
2033
2034         (WebVideoFullscreenInterfaceAVKit::setSeekableRanges):
2035         Convert TimeRange to CMTimeRange.
2036
2037         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2038         (WebVideoFullscreenModelMediaElement::setMediaElement):
2039         Set initial seekable ranges.
2040
2041         (WebVideoFullscreenModelMediaElement::handleEvent):
2042         Update seekable ranges when time changes.
2043
2044 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
2045
2046         Fix OS X build.
2047
2048         * WebCore.exp.in: Add missing export symbol.
2049
2050 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2051
2052         Fix the Windows build. Add a no-op impl for Mac non-UI-side.
2053
2054         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2055         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2056         (PlatformCALayerWin::PlatformCALayerWin):
2057         * platform/graphics/ca/win/PlatformCALayerWin.h:
2058
2059 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2060
2061         REGRESSION (r155977): matrix animations no longer animate
2062         https://bugs.webkit.org/show_bug.cgi?id=130789
2063         <rdar://problem/15650946>
2064
2065         Reviewed by Dean Jackson.
2066         
2067         r155977 erroneously removed two lines that set the end points for
2068         matrix animations (used when transform lists don't match), so
2069         put them back.
2070         
2071         Also don't repaint when updateContentsScale()
2072         is called and doesn't change the contents scale.
2073
2074         Test: compositing/animation/matrix-animation.html
2075
2076         * platform/graphics/ca/GraphicsLayerCA.cpp:
2077         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
2078         (WebCore::GraphicsLayerCA::setTransformAnimationEndpoints):
2079         (WebCore::GraphicsLayerCA::updateContentsScale):
2080
2081 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2082
2083         Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
2084         https://bugs.webkit.org/show_bug.cgi?id=130778
2085
2086         Reviewed by Tim Horton.
2087
2088         Make it possible to put a "custom behavior" flag on a layer so that,
2089         with UI-side compositing, we know to create a specific type of
2090         layer or view for that GraphicsLayer.
2091
2092         * WebCore.exp.in:
2093         * platform/graphics/GraphicsLayer.cpp:
2094         (WebCore::GraphicsLayer::GraphicsLayer):
2095         * platform/graphics/GraphicsLayer.h:
2096         (WebCore::GraphicsLayer::setCustomBehavior):
2097         (WebCore::GraphicsLayer::customBehavior):
2098         * platform/graphics/ca/GraphicsLayerCA.cpp:
2099         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2100         (WebCore::GraphicsLayerCA::updateCustomBehavior):
2101         (WebCore::GraphicsLayerCA::setCustomBehavior):
2102         * platform/graphics/ca/GraphicsLayerCA.h:
2103         * platform/graphics/ca/PlatformCALayer.h:
2104         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2105         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2106         (PlatformCALayerMac::PlatformCALayerMac):
2107         * rendering/RenderLayerBacking.cpp:
2108         (WebCore::RenderLayerBacking::updateScrollingLayers):
2109
2110 2014-03-26  Brent Fulgham  <bfulgham@apple.com>
2111
2112         Unreviewed test correction.
2113
2114         Because of the way DRT on Windows links to WebCore, having the implementaion of the update
2115         method in the header caused a runtime failure due to duplicate symbols being bound to the
2116         compilation unit.
2117
2118         * accessibility/AXObjectCache.cpp:
2119         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Moved from header.
2120         * accessibility/AXObjectCache.h:
2121         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility): Deleted.
2122
2123 2014-03-26  Jer Noble  <jer.noble@apple.com>
2124
2125         REGRESSION(r162679): Poster image visible under the video
2126         https://bugs.webkit.org/show_bug.cgi?id=130783
2127
2128         Reviewed by Simon Fraser.
2129
2130         In the listed revision, we started checking for isRenderImage()
2131         instead of isImage(). RenderMedias return 'true' for the first
2132         but 'false' for the second. Change the if() statement to check
2133         for isRenderMedia() in addition to !isRenderImage().
2134
2135         * rendering/RenderLayerBacking.cpp:
2136         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
2137
2138 2014-03-26  Antti Koivisto  <antti@apple.com>
2139
2140         Render tree construction is O(N^2) in number of siblings
2141         https://bugs.webkit.org/show_bug.cgi?id=129065
2142
2143         Reviewed by Darin Adler.
2144         
2145         When adding a new renderer to the tree we would search for the correct render tree
2146         position by traversing DOM children forward to find something that already has a renderer.
2147         In common case there is no such renderer. This would be repeated for each inserted renderer
2148         leading to O(n^2) in respect to child node count.
2149         
2150         This patch caches the computed render tree insertion position and passes it to siblings.
2151         Until the cached position is reached it can be used for all new renderers.
2152
2153         Test: perf/sibling-renderer-On2.html
2154
2155         * style/StyleResolveTree.cpp:
2156         (WebCore::Style::RenderTreePosition::parent):
2157         (WebCore::Style::RenderTreePosition::RenderTreePosition):
2158         (WebCore::Style::RenderTreePosition::canInsert):
2159         (WebCore::Style::RenderTreePosition::insert):
2160         (WebCore::Style::RenderTreePosition::computeNextSibling):
2161         (WebCore::Style::RenderTreePosition::invalidateNextSibling):
2162         (WebCore::Style::styleForElement):
2163         (WebCore::Style::elementInsideRegionNeedsRenderer):
2164         (WebCore::Style::createRendererIfNeeded):
2165         (WebCore::Style::createTextRendererIfNeeded):
2166         (WebCore::Style::attachTextRenderer):
2167         (WebCore::Style::updateTextRendererAfterContentChange):
2168         (WebCore::Style::attachChildren):
2169         (WebCore::Style::attachDistributedChildren):
2170         (WebCore::Style::attachShadowRoot):
2171         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded):
2172         (WebCore::Style::attachRenderTree):
2173         (WebCore::Style::resolveLocal):
2174         (WebCore::Style::resolveTextNode):
2175         (WebCore::Style::resolveShadowTree):
2176         (WebCore::Style::updateBeforeOrAfterPseudoElement):
2177         (WebCore::Style::resolveTree):
2178
2179 2014-03-26  Commit Queue  <commit-queue@webkit.org>
2180
2181         Unreviewed, rolling out r166264.
2182         https://bugs.webkit.org/show_bug.cgi?id=130785
2183
2184         Broke some window.opener tests for WK2 Mavericks (Requested by
2185         brrian__ on #webkit).
2186
2187         Reverted changeset:
2188
2189         "Web Replay: resource unique identifiers should be unique-per-
2190         frame, not globally"
2191         https://bugs.webkit.org/show_bug.cgi?id=130632
2192         http://trac.webkit.org/changeset/166264
2193
2194 2014-03-26  Zoltan Horvath  <zoltan@webkit.org>
2195
2196         [CSS Shapes] Remove shape-inside support
2197         https://bugs.webkit.org/show_bug.cgi?id=130698
2198
2199         Reviewed by David Hyatt.
2200
2201         CSS Shapes Level 1 (CR) only contains shape-outside. We are focusing our efforts on finalizing
2202         the implementation of shape-outside, it's worth to remove shape-inside code at this point for now.
2203
2204         A list of reasons for the removal:
2205           - Shape-inside is only part of Shapes Level 2, which needs to be improved on some topics.
2206           - Shape-inside is lack of new shapes support (e.g. inset).
2207           - Deprecated shapes (r165472) are removed from the code (e.g. rectangle), which affects shape-inside. 
2208           - The current shape-inside code spreads across the layout code.
2209           - The current shape-inside implementation is experimental in some areas,
2210             and the partially implemented code can have security implications.
2211           - Removal of shape-inside opens possibilities for code complexity and performance
2212             optimizations for shape-outside. (e.g. simpler geometry code)
2213
2214         No new tests are needed.
2215
2216         * CMakeLists.txt:
2217         * Configurations/FeatureDefines.xcconfig:
2218         * GNUmakefile.list.am:
2219         * WebCore.xcodeproj/project.pbxproj:
2220         * css/CSSComputedStyleDeclaration.cpp:
2221         (WebCore::ComputedStyleExtractor::propertyValue):
2222         * css/CSSParser.cpp:
2223         (WebCore::isSimpleLengthPropertyID):
2224         (WebCore::CSSParser::parseValue):
2225         (WebCore::CSSParser::parseShapeProperty):
2226         * css/CSSPropertyNames.in:
2227         * css/DeprecatedStyleBuilder.cpp:
2228         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2229         * css/StyleResolver.cpp:
2230         (WebCore::StyleResolver::applyProperty):
2231         (WebCore::StyleResolver::loadPendingImages):
2232         * page/animation/CSSPropertyAnimation.cpp:
2233         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2234         * rendering/LayoutState.cpp:
2235         (WebCore::LayoutState::LayoutState):
2236         * rendering/LayoutState.h:
2237         (WebCore::LayoutState::LayoutState):
2238         (WebCore::LayoutState::shapeInsideInfo): Deleted.
2239         * rendering/RenderBlock.cpp:
2240         (WebCore::RenderBlock::styleDidChange):
2241         (WebCore::RenderBlock::imageChanged):
2242         (WebCore::RenderBlock::preparePaginationBeforeBlockLayout):
2243         (WebCore::RenderBlock::relayoutShapeDescendantIfMoved): Deleted.
2244         (WebCore::RenderBlock::logicalOffsetFromShapeAncestorContainer): Deleted.
2245         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange): Deleted.
2246         (WebCore::RenderBlock::ensureShapeInsideInfo): Deleted.
2247         (WebCore::RenderBlock::shapeInsideInfo): Deleted.
2248         (WebCore::RenderBlock::setShapeInsideInfo): Deleted.
2249         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout): Deleted.
2250         (WebCore::RenderBlock::layoutShapeInsideInfo): Deleted.
2251         (WebCore::shapeInfoRequiresRelayout): Deleted.
2252         (WebCore::RenderBlock::computeShapeSize): Deleted.
2253         (WebCore::RenderBlock::updateShapesBeforeBlockLayout): Deleted.
2254         (WebCore::RenderBlock::updateShapesAfterBlockLayout): Deleted.
2255         (WebCore::RenderBlock::prepareShapesAndPaginationBeforeBlockLayout): Deleted.
2256         * rendering/RenderBlock.h:
2257         (WebCore::RenderBlock::allowsShapeInsideInfoSharing): Deleted.
2258         * rendering/RenderBlockFlow.cpp:
2259         (WebCore::RenderBlockFlow::layoutBlock):
2260         (WebCore::RenderBlockFlow::layoutBlockChild):
2261         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2262         * rendering/RenderBlockFlow.h:
2263         * rendering/RenderBlockLineLayout.cpp:
2264         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
2265         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2266         (WebCore::constructBidiRunsForLine): Deleted.
2267         (WebCore::pushShapeContentOverflowBelowTheContentBox): Deleted.
2268         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLine): Deleted.
2269         (WebCore::RenderBlockFlow::updateShapeAndSegmentsForCurrentLineInFlowThread): Deleted.
2270         (WebCore::adjustLogicalLineTop): Deleted.
2271         (WebCore::RenderBlockFlow::adjustLogicalLineTopAndLogicalHeightIfNeeded): Deleted.
2272         * rendering/RenderDeprecatedFlexibleBox.cpp:
2273         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2274         * rendering/RenderElement.cpp:
2275         (WebCore::RenderElement::~RenderElement):
2276         (WebCore::RenderElement::initializeStyle):
2277         (WebCore::RenderElement::setStyle):
2278         * rendering/RenderFlexibleBox.cpp:
2279         (WebCore::RenderFlexibleBox::layoutBlock):
2280         * rendering/RenderGrid.cpp:
2281         (WebCore::RenderGrid::layoutBlock):
2282         * rendering/RenderNamedFlowFragment.cpp:
2283         (WebCore::RenderNamedFlowFragment::createStyle):
2284         * rendering/RenderView.h:
2285         * rendering/SimpleLineLayout.cpp:
2286         (WebCore::SimpleLineLayout::canUseFor):
2287         * rendering/line/BreakingContextInlineHeaders.h:
2288         (WebCore::BreakingContext::handleText):
2289         (WebCore::BreakingContext::handleEndOfLine):
2290         (WebCore::updateSegmentsForShapes): Deleted.
2291         * rendering/line/LineBreaker.cpp:
2292         (WebCore::LineBreaker::nextLineBreak):
2293         * rendering/line/LineWidth.cpp:
2294         (WebCore::LineWidth::LineWidth):
2295         (WebCore::LineWidth::updateAvailableWidth):
2296         (WebCore::LineWidth::wrapNextToShapeOutside):
2297         (WebCore::LineWidth::fitBelowFloats):
2298         (WebCore::LineWidth::updateLineSegment): Deleted.
2299         (WebCore::LineWidth::updateCurrentShapeSegment): Deleted.
2300         * rendering/line/LineWidth.h:
2301         * rendering/shapes/ShapeInsideInfo.cpp: Removed.
2302         * rendering/shapes/ShapeInsideInfo.h: Removed.
2303         * rendering/style/RenderStyle.cpp:
2304         (WebCore::RenderStyle::changeRequiresLayout):
2305         * rendering/style/RenderStyle.h:
2306         * rendering/style/StyleRareNonInheritedData.cpp:
2307         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2308         (WebCore::StyleRareNonInheritedData::operator==):
2309         * rendering/style/StyleRareNonInheritedData.h:
2310
2311 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
2312
2313         Avoid duplicate size checks when creating empty image
2314         https://bugs.webkit.org/show_bug.cgi?id=130730
2315
2316         Reviewed by Dean Jackson.
2317
2318         Merged from Blink (patch by ch.dumez@samsung.com):
2319         https://chromium.googlesource.com/chromium/blink/+/4861a71bc1f284fc97417f405ab7d08dc6947b88
2320         http://crbug.com/190633011
2321
2322         * html/canvas/CanvasRenderingContext2D.cpp:
2323         (WebCore::createEmptyImageData): Don't perform overflow calculation twice.
2324
2325 2014-03-26  Sergio Villar Senin  <svillar@igalia.com>
2326
2327         [CSS Grid Layout] getComputedStyle() must return the specified value for positioning properties
2328         https://bugs.webkit.org/show_bug.cgi?id=130010
2329
2330         Reviewed by Darin Adler.
2331
2332         According to the specs
2333         http://dev.w3.org/csswg/css-grid/#property-index and also to
2334         http://lists.w3.org/Archives/Public/www-style/2014Mar/0162.html
2335         the function getComputedStyle() must return the specified values
2336         for positioning properties, i.e, grid-{columns|rows}-{start|end}.
2337
2338         We were in some cases, adjusting the style in the StyleResolver
2339         (for example with two opposing spans) something that is now done
2340         in the RenderGrid because we cannot alter the original style.
2341
2342         The code moved to the renderer became more self explanatory and it
2343         now supports named grid areas with names ending in "-start" and
2344         "-end".
2345
2346         Test: fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html
2347
2348         * css/StyleResolver.cpp:
2349         (WebCore::StyleResolver::adjustRenderStyle):
2350         (WebCore::gridLineDefinedBeforeGridArea): Deleted.
2351         (WebCore::StyleResolver::adjustNamedGridItemPosition): Deleted.
2352         (WebCore::StyleResolver::adjustGridItemPosition): Deleted.
2353         * css/StyleResolver.h:
2354         * rendering/RenderGrid.cpp:
2355         (WebCore::isColumnSide):
2356         (WebCore::RenderGrid::explicitGridSizeForSide):
2357         (WebCore::gridLineDefinedBeforeGridArea):
2358         (WebCore::setNamedLinePositionIfDefinedBeforeArea):
2359         (WebCore::RenderGrid::adjustNamedGridItemPosition):
2360         (WebCore::RenderGrid::adjustGridPositionsFromStyle):
2361         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
2362         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle):
2363         (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition):
2364         * rendering/RenderGrid.h:
2365         * rendering/style/GridPosition.h:
2366         (WebCore::GridPosition::setAutoPosition): New helper function.
2367
2368 2014-03-26  Simon Fraser  <simon.fraser@apple.com>
2369
2370         Fix the iOS build.
2371
2372         * WebCore.exp.in:
2373
2374 2014-03-26  Tim Horton  <timothy_horton@apple.com>
2375
2376         [iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
2377         https://bugs.webkit.org/show_bug.cgi?id=130768
2378         <rdar://problem/16421471>
2379
2380         Reviewed by Simon Fraser.
2381
2382         * platform/graphics/cocoa/IOSurface.h:
2383         Add a non-ensuring platformContext() getter.
2384
2385 2014-03-26  James Craig  <jcraig@apple.com>
2386
2387         Web Inspector: AXI: crash when inspecting "bar" text node in getAccessibilityPropertiesForNode layout test
2388         https://bugs.webkit.org/show_bug.cgi?id=130290
2389
2390         Reviewed by Timothy Hatcher.
2391
2392         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2393
2394         Fixing regression from r165590. http://webkit.org/b/129779
2395         Verify isElementNode to avoid calling toElement on document or text nodes.
2396
2397         * inspector/InspectorDOMAgent.cpp:
2398         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2399
2400 2014-03-25  Sergio Villar Senin  <svillar@igalia.com>
2401
2402         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in editing/
2403         https://bugs.webkit.org/show_bug.cgi?id=130722
2404
2405         Reviewed by Antti Koivisto.
2406
2407         * editing/AlternativeTextController.cpp:
2408         (WebCore::markerTypesForAutocorrection):
2409         (WebCore::markerTypesForReplacement):
2410         (WebCore::markerTypesForAppliedDictationAlternative):
2411         * editing/EditingStyle.cpp:
2412         (WebCore::htmlElementEquivalents):
2413         (WebCore::htmlAttributeEquivalents):
2414         * editing/FormatBlockCommand.cpp:
2415         (WebCore::isElementForFormatBlock):
2416         * editing/RemoveFormatCommand.cpp:
2417         (WebCore::isElementForRemoveFormatCommand):
2418         * editing/ReplaceSelectionCommand.cpp:
2419         (WebCore::isProhibitedParagraphChild):
2420         * editing/atk/FrameSelectionAtk.cpp:
2421         (WebCore::maybeEmitTextFocusChange):
2422
2423 2014-03-25  Simon Fraser  <simon.fraser@apple.com>
2424
2425         Add a new type of scrolling tree node for overflow scrolling
2426         https://bugs.webkit.org/show_bug.cgi?id=130763
2427
2428         Reviewed by Tim Horton.
2429
2430         Prepare for overflow scrolling via the scrolling tree by adding
2431         a new scrolling node type for overflow:scroll nodes. Mostly
2432         this is a new ScrollingNodeType that gets mapped to the same
2433         scrolling state nodes and scrolling nodes, but iOS creates
2434         state and scrolling nodes specific to overflow:scroll.
2435         
2436         Change the type checking on nodes to use virtual functions instead
2437         of just checking the node type, to allow the macros to work with
2438         the new scrolling node type.
2439
2440         * WebCore.exp.in:
2441         * page/scrolling/AsyncScrollingCoordinator.cpp:
2442         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
2443         * page/scrolling/ScrollingCoordinator.h:
2444         * page/scrolling/ScrollingStateFixedNode.h:
2445         * page/scrolling/ScrollingStateNode.h:
2446         (WebCore::ScrollingStateNode::isFixedNode):
2447         (WebCore::ScrollingStateNode::isStickyNode):
2448         (WebCore::ScrollingStateNode::isScrollingNode):
2449         * page/scrolling/ScrollingStateScrollingNode.cpp:
2450         (WebCore::ScrollingStateScrollingNode::create):
2451         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2452         * page/scrolling/ScrollingStateScrollingNode.h:
2453         * page/scrolling/ScrollingStateStickyNode.h:
2454         * page/scrolling/ScrollingStateTree.cpp:
2455         (WebCore::ScrollingStateTree::attachNode):
2456         * page/scrolling/ScrollingTree.cpp:
2457         (WebCore::ScrollingTree::viewportChangedViaDelegatedScrolling):
2458         (WebCore::ScrollingTree::updateTreeFromStateNode):
2459         * page/scrolling/ScrollingTreeNode.h:
2460         (WebCore::ScrollingTreeNode::isFixedNode):
2461         (WebCore::ScrollingTreeNode::isStickyNode):
2462         (WebCore::ScrollingTreeNode::isScrollingNode):
2463         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2464         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
2465         * page/scrolling/ScrollingTreeScrollingNode.h:
2466         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2467         (WebCore::ScrollingCoordinatorIOS::createScrollingTreeNode):
2468         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.h:
2469         * page/scrolling/ios/ScrollingTreeScrollingNodeIOS.mm:
2470         (WebCore::ScrollingTreeScrollingNodeIOS::create):
2471         (WebCore::ScrollingTreeScrollingNodeIOS::ScrollingTreeScrollingNodeIOS):
2472         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2473         (WebCore::ScrollingCoordinatorMac::createScrollingTreeNode):
2474         * page/scrolling/mac/ScrollingTreeFixedNode.h:
2475         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
2476         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2477         (WebCore::ScrollingTreeScrollingNodeMac::create):
2478         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
2479         * page/scrolling/mac/ScrollingTreeStickyNode.h:
2480         * rendering/RenderLayerCompositor.cpp:
2481         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2482
2483 2014-03-26  Krzysztof Czech  <k.czech@samsung.com>
2484
2485         [ATK] Utilize new AtkValue interface coming in ATK 2.11.92
2486         https://bugs.webkit.org/show_bug.cgi?id=130575
2487
2488         Reviewed by Mario Sanchez Prada.
2489
2490         ATK 2.11.92 introduces some new API and deprecates an old one.
2491         Adjust current implementation to meet requirements of the new API.
2492
2493         No new tests. Covered by existing ones.
2494
2495         * accessibility/atk/AXObjectCacheAtk.cpp:
2496         (WebCore::AXObjectCache::postPlatformNotification):
2497         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2498         (webkitAccessibleSetNewValue):
2499         (webkitAccessibleGetIncrementValue):
2500         (webkitAccessibleGetValueAndText):
2501         (webkitAccessibleGetIncrement):
2502         (webkitAccessibleSetValue):
2503         (webkitAccessibleGetRange):
2504         (webkitAccessibleValueSetCurrentValue):
2505         (webkitAccessibleValueGetMinimumIncrement):
2506         (webkitAccessibleValueInterfaceInit):
2507
2508 2014-03-26  Zan Dobersek  <zdobersek@igalia.com>
2509
2510         Unreviewed. Removing the remaining Automake cruft.
2511
2512         * GNUmakefile.list.am: Removed.
2513
2514 2014-03-25  Pratik Solanki  <psolanki@apple.com>
2515
2516         iOS build fix. Add missing semicolon.
2517
2518         * editing/cocoa/HTMLConverter.mm:
2519         (HTMLConverter::_addAttachmentForElement):
2520
2521 2014-03-25  Sam Weinig  <sam@webkit.org>
2522
2523         Speculative iOS build fix.
2524
2525         * editing/cocoa/HTMLConverter.mm:
2526         (HTMLConverter::_addAttachmentForElement):
2527
2528 2014-03-25  Jer Noble  <jer.noble@apple.com>
2529
2530         [MSE] Duplicate 'seeked' events.
2531         https://bugs.webkit.org/show_bug.cgi?id=130754
2532
2533         Reviewed by Eric Carlson.
2534
2535         Test: media/media-source/media-source-duplicate-seeked.html
2536
2537         During certain seek operations, HTMLMediaElement::finishSeek() can be called re-entrantly due to
2538         the ready state changing as a result of MediaSource::monitorSourceBuffers(). Move this call to the
2539         end of finishSeek() after m_seeking has been cleared.
2540
2541         * html/HTMLMediaElement.cpp:
2542         (WebCore::HTMLMediaElement::parseAttribute):
2543
2544 2014-03-25  James Craig  <jcraig@apple.com>
2545
2546         Web Inspector: AXI: add support for aria-activedescendant and reconcile UI/testing with parentNode
2547         https://bugs.webkit.org/show_bug.cgi?id=130712
2548
2549         Reviewed by Timothy Hatcher.
2550
2551         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
2552
2553         Support for @aria-activedescendant; code reuse changes w/ parentNode and activeDescendantNode.
2554
2555         * inspector/InspectorDOMAgent.cpp:
2556         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2557         * inspector/protocol/DOM.json:
2558
2559 2014-03-25  Sanghyup Lee  <sh53.lee@samsung.com>
2560
2561         When the mouse is upped after dragged out of shadowDOM, it should lose :active.
2562         https://bugs.webkit.org/show_bug.cgi?id=130660
2563
2564         Reviewed by Darin Adler.
2565
2566         This caused a regression after r165037.
2567         When we have to clear :active style of shadow DOM, we should clear host's style.
2568         This patch replaces parentElement() by parentOrShadowHostElement().
2569
2570         * dom/Document.cpp:
2571         (WebCore::Document::updateHoverActiveState):
2572
2573 2014-03-25  Eric Carlson  <eric.carlson@apple.com>
2574
2575         [Mac] Always retry a failed MediaDocument as a PluginDocument
2576         https://bugs.webkit.org/show_bug.cgi?id=130742
2577
2578         Reviewed by Jer Noble.
2579
2580         * html/HTMLMediaElement.cpp:
2581         (WebCore::HTMLMediaElement::mediaLoadingFailedFatally): If the element is in a media document,
2582             tell it that loading failed so it can retry as a plug-in.
2583
2584 2014-03-25  Ryosuke Niwa  <rniwa@webkit.org>
2585
2586         Replace HTMLConverter::_stringForNode by propertyValueForNode
2587         https://bugs.webkit.org/show_bug.cgi?id=130711
2588
2589         Reviewed by Sam Weinig.
2590
2591         Replaced all calls to HTMLConverter::_stringForNode by that to propertyValueForNode.
2592
2593         * editing/cocoa/HTMLConverter.mm:
2594         (HTMLConverter::_computedAttributesForElement):
2595         (HTMLConverter::_addAttachmentForElement):
2596         (HTMLConverter::_enterElement):
2597         (HTMLConverter::_addTableForElement):
2598         (HTMLConverter::_addTableCellForElement):
2599         (HTMLConverter::_processElement):
2600         (HTMLConverter::_exitElement):
2601         (HTMLConverter::_processText):
2602         (HTMLConverter::_traverseNode):
2603         (HTMLConverter::_traverseFooterNode):
2604         (HTMLConverter::_stringForNode): Deleted.
2605
2606 2014-03-25  Pratik Solanki  <psolanki@apple.com>
2607
2608         Attempt to fix iOS build after r166261.
2609
2610         * WebCore.xcodeproj/project.pbxproj: Make SystemSleepListener.h a private header.
2611
2612 2014-03-21  Jer Noble  <jer.noble@apple.com>
2613
2614         [iOS] Enable caption support in full screen.
2615         https://bugs.webkit.org/show_bug.cgi?id=130603
2616
2617         Reviewed by Eric Carlson.
2618
2619         Add TextTrackRepresentation support to MediaPlayerPrivateAVFoundationObjC.
2620
2621         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2622         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2623         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Add the m_textTrackRepresenationLayer if present.
2624         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
2625         (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation): True, if a m_videoFullscreenLayer is present.
2626         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation): Remove the old, and add the new m_textTrackRepresenationLayer.
2627
2628         Make the text track container a stacking context for painting purposes.
2629         * Modules/mediacontrols/mediaControlsiOS.css:
2630         (video::-webkit-media-text-track-container):
2631
2632 2014-03-25  Brian Burg  <bburg@apple.com>
2633
2634         Web Replay: resource unique identifiers should be unique-per-frame, not globally
2635         https://bugs.webkit.org/show_bug.cgi?id=130632
2636
2637         Reviewed by Timothy Hatcher.
2638
2639         For replay purposes, we want to deterministically assign resource load identifiers
2640         to resource loaders, provided that the resource loaders are created in the same
2641         order.
2642
2643         To do this, we convert unique identifiers from being globally-unique to being
2644         frame-unique. When a new frame is being loaded, unique identifiers for
2645         subresources of that frame begin counting from 1.
2646
2647         No new tests. Identifier invariants are exercised by existing assertions and tests.
2648
2649         * loader/ProgressTracker.cpp:
2650         (WebCore::ProgressTracker::ProgressTracker):
2651         (WebCore::ProgressTracker::reset):
2652         (WebCore::ProgressTracker::createUniqueIdentifier):
2653         * loader/ProgressTracker.h:
2654
2655 2014-03-25  Jer Noble  <jer.noble@apple.com>
2656
2657         [Mac] Pause the media element during system sleep.
2658         https://bugs.webkit.org/show_bug.cgi?id=130718
2659
2660         Reviewed by Eric Carlson.
2661
2662         Test: media/video-system-sleep.html
2663
2664         Relying on the platform media system to pause and restart playback during
2665         system sleep can cause problems on some platforms, especially where hardware
2666         decoders are concerned. Rather than implicitly pausing the media during
2667         system sleep, explicitly pause the media before sleeping and resume (if
2668         appropriate) upon waking.
2669
2670         Add a new class to be used for system sleep notifications:
2671         * platform/SystemSleepListener.cpp: Added.
2672         (WebCore::SystemSleepListener::create):
2673         (WebCore::SystemSleepListener::SystemSleepListener):
2674         * platform/SystemSleepListener.h: Added.
2675         (WebCore::SystemSleepListener::Client::~Client):
2676         (WebCore::SystemSleepListener::~SystemSleepListener):
2677         (WebCore::SystemSleepListener::client):
2678
2679         Add a Mac-specific implementation:
2680         * platform/mac/SystemSleepListenerMac.h: Added.
2681         * platform/mac/SystemSleepListenerMac.mm: Added.
2682         (WebCore::SystemSleepListener::create):
2683         (WebCore::SystemSleepListenerMac::SystemSleepListenerMac):
2684         (WebCore::SystemSleepListenerMac::~SystemSleepListenerMac):
2685
2686         Listen for system sleep notifications in MediaSessionManager:
2687         * platform/audio/MediaSessionManager.cpp:
2688         (WebCore::MediaSessionManager::MediaSessionManager):
2689         (WebCore::MediaSessionManager::systemWillSleep):
2690         (WebCore::MediaSessionManager::systemDidWake):
2691         * platform/audio/MediaSessionManager.h:
2692
2693         Drive-by fix; notify the MediaSession that playback will begin
2694         due to autoplay, but do not begin autoplaying if the session
2695         is already interrupted:
2696         * html/HTMLMediaElement.cpp:
2697         (WebCore::HTMLMediaElement::parseAttribute):
2698
2699         Add new files to project:
2700         * WebCore.vcxproj/WebCore.vcxproj:
2701         * WebCore.xcodeproj/project.pbxproj:
2702         * CMakeLists.txt:
2703         * GNUmakefile.list.am:
2704
2705 2014-03-25  Radu Stavila  <stavila@adobe.com>
2706
2707         [CSS Regions] The background of children of scrollable elements flowed into regions is not properly scrolled
2708         https://bugs.webkit.org/show_bug.cgi?id=130574
2709
2710         Reviewed by David Hyatt.
2711
2712         When computing the clip rect for painting the box decorations, the scrolled content offset
2713         must be computed by going up the containing block tree, up to the region.
2714
2715         Tests: fast/regions/scrollable-region-scrollable-absolute-content-background.html
2716                fast/regions/scrollable-region-scrollable-content-background.html
2717
2718         * rendering/RenderNamedFlowThread.cpp:
2719         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
2720
2721 2014-03-25  Joseph Pecoraro  <pecoraro@apple.com>
2722
2723         [iOS] Inspector View Indication Support
2724         https://bugs.webkit.org/show_bug.cgi?id=130709
2725
2726         Reviewed by Simon Fraser.
2727
2728         * inspector/InspectorClient.h:
2729         (WebCore::InspectorClient::showInspectorIndication):
2730         (WebCore::InspectorClient::hideInspectorIndication):
2731         * inspector/InspectorController.cpp:
2732         (WebCore::InspectorController::setIndicating):
2733         Rename indicate/hideIndication to show/hide names.
2734
2735 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
2736
2737         Unreviewed build fix. Typo on checkin.
2738
2739         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2740         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Left an unmatched open bracket.
2741
2742 2014-03-25  Jer Noble  <jer.noble@apple.com>
2743
2744         Even further unreviewed build fix after r166247. Unprotect the implementation of HTMLMediaElement::shouldDisableSleep().
2745
2746         * html/HTMLMediaElement.cpp:
2747         (WebCore::HTMLMediaElement::parseAttribute):
2748
2749 2014-03-25  Jer Noble  <jer.noble@apple.com>
2750
2751         Further unreviewed build fix after r166247. Add DisplaySleepDisabler to the windows project file and
2752         move the definition of DisplaySleepDisabler's constructor and destructor into the cpp file.
2753
2754         * WebCore.vcxproj/WebCore.vcxproj:
2755         * platform/DisplaySleepDisabler.cpp:
2756         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
2757         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
2758         * platform/DisplaySleepDisabler.h:
2759
2760 2014-03-25  Jer Noble  <jer.noble@apple.com>
2761
2762         Unreviewed build fix after r166247. Un-platform-protect the declaration of HTMLMediaElement::shouldDisableSleep()
2763         and make WebVideoFullscreenController's _displaySleepDisabler a std::unique_ptr.
2764
2765         * html/HTMLMediaElement.h:
2766         * platform/mac/WebVideoFullscreenController.h:
2767
2768 2014-03-25  Brent Fulgham  <bfulgham@apple.com>
2769
2770         [iOS] Pass additional options to AVFoundation during playback.
2771         https://bugs.webkit.org/show_bug.cgi?id=130624
2772
2773         Reviewed by Eric Carlson.
2774
2775         * html/HTMLMediaElement.cpp:
2776         (WebCore::HTMLMediaElement::doesHaveAttribute): Return attribute value if the user
2777         passes a pointer to fill in.
2778         * html/HTMLMediaElement.h:
2779         * platform/graphics/MediaPlayer.cpp:
2780         (WebCore::MediaPlayer::doesHaveAttribute):
2781         * platform/graphics/MediaPlayer.h:
2782         (WebCore::MediaPlayerClient::doesHaveAttribute):
2783         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2784         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Pass additional
2785         option if supplied by user.
2786
2787 2014-03-25  Michael Saboff  <msaboff@apple.com>
2788
2789         Unreviewed, rolling out r166070.
2790
2791         Rollout r166070 due to 2% performance loss in page load times
2792
2793         Reverted changeset:
2794
2795         "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
2796         general purpose"
2797         https://bugs.webkit.org/show_bug.cgi?id=130553
2798         http://trac.webkit.org/changeset/166070
2799
2800 2014-03-25  Michael Saboff  <msaboff@apple.com>
2801
2802         Unreviewed, rolling out r166126.
2803
2804         Rollout r166126 in prepartion to roll out prerequisite r166070
2805
2806         Reverted changeset:
2807
2808         "toThis() on a JSWorkerGlobalScope should return a JSProxy and
2809         not undefined"
2810         https://bugs.webkit.org/show_bug.cgi?id=130554
2811         http://trac.webkit.org/changeset/166126
2812
2813 2014-03-25  Jer Noble  <jer.noble@apple.com>
2814
2815         [iOS] Playing video does not disable display sleep.
2816         https://bugs.webkit.org/show_bug.cgi?id=130729
2817
2818         Reviewed by Eric Carlson.
2819
2820         DisplaySleepDisabler was broken by r161589, which replaced the iOS implementation with
2821         an empty one. Make a platform independent version with a Cocoa-platform subclass. Update
2822         the APIs to non-deprecated ones.
2823
2824         * platform/DisplaySleepDisabler.cpp: Added.
2825         (WebCore::DisplaySleepDisabler::create):
2826         * platform/DisplaySleepDisabler.h: Added.
2827         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
2828         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
2829         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.cpp.
2830         (WebCore::DisplaySleepDisabler::create):
2831         (WebCore::DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa):
2832         (WebCore::DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa):
2833         * platform/cocoa/DisplaySleepDisablerCocoa.h: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.h.
2834
2835         Update m_sleepDisabler to be a std::unique_ptr, and unprotect the definition of methods which use it.
2836         * html/HTMLMediaElement.cpp:
2837         (WebCore::HTMLMediaElement::updateSleepDisabling):
2838         (WebCore::HTMLMediaElement::shouldDisableSleep):
2839         * html/HTMLMediaElement.h:
2840
2841         Add the new and renamed files to the project:
2842         * CMakeLists.txt:
2843         * GNUmakefile.list.am:
2844         * WebCore.xcodeproj/project.pbxproj:
2845
2846 2014-03-25  Dirk Schulze  <krit@webkit.org>
2847
2848         Implement ImageData constructors and WebWorkers exposure
2849         https://bugs.webkit.org/show_bug.cgi?id=130668
2850
2851         Reviewed by Dean Jackson.
2852
2853         Add new constructors for ImageData.
2854
2855         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
2856
2857         Test: fast/canvas/canvas-imageData.html
2858
2859         * html/ImageData.cpp: 
2860         (WebCore::ImageData::create):
2861         * html/ImageData.h:
2862         * html/ImageData.idl:
2863
2864 2014-03-25  Myles C. Maxfield  <mmaxfield@apple.com>
2865
2866         InlineIterator position (unsigned int) variable can wrap around
2867         https://bugs.webkit.org/show_bug.cgi?id=130540
2868
2869         Reviewed by Simon Fraser.
2870
2871         We trigger an ASSERT that occurs when we are ignoring spaces (to collapse them
2872         into a single whitespace mark) but then encounter a line break. Because we don't ignore
2873         the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
2874         we want to ignore that first space as well (so as not to push the text away from the right
2875         edge). We do this by decrementing the InlineIterator pointing to this first space, so all
2876         the spaces get ignored. However, if that space is the first character in a Text node, the
2877         decrement will try to go past the beginning of the node, and trigger an ASSERT.
2878
2879         This design is not great. At some point we should rework it to more elegantly handle
2880         collapsing whitespace in both RTL and LTR writing modes.
2881
2882         This patch adds an ASSERT earlier in this codepath to catch potential problems earlier.
2883         It also pulls our sentinel value out into a separate boolean to make it more clear what is
2884         going on.
2885
2886         Test: fast/text/whitespace-only-text-in-rtl.html
2887
2888         * rendering/InlineIterator.h:
2889         (WebCore::InlineIterator::moveTo): Use the set***() calls
2890         (WebCore::InlineIterator::setOffset): ASSERT early that our math hasn't wrapped
2891         * rendering/RenderBlockLineLayout.cpp:
2892         (WebCore::RenderBlockFlow::appendRunsForObject): Use new boolean value
2893         * rendering/line/BreakingContextInlineHeaders.h:
2894         (WebCore::BreakingContext::handleText): Guard against wraps
2895         (WebCore::checkMidpoints): Use new boolean value
2896         * rendering/line/TrailingObjects.cpp:
2897         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Use new boolean value
2898
2899 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
2900
2901         [GTK] Remove the autotools build
2902         https://bugs.webkit.org/show_bug.cgi?id=130717
2903
2904         Reviewed by Anders Carlsson.
2905
2906         * GNUmakefile.am: Removed.
2907         * bindings/gobject/GNUmakefile.am: Removed.
2908         * config.h: Removed references to autotools configure file.
2909
2910 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
2911
2912         Prevent 'removetrack' events from firing when all inband text tracks are removed.
2913         https://bugs.webkit.org/show_bug.cgi?id=130704
2914
2915         Reviewed by Eric Carlson.
2916
2917         Test: media/track/track-remove-track.html
2918
2919         Based on the Blink change (patch by acolwell@chromium.org):
2920         https://codereview.chromium.org/177243018/
2921
2922         * html/HTMLMediaElement.cpp:
2923         (WebCore::HTMLMediaElement::prepareForLoad): Reorder steps to match W3C specification.
2924         (WebCore::HTMLMediaElement::noneSupported): Forget tracks as required by specification.
2925         (WebCore::HTMLMediaElement::mediaLoadingFailed): Forget tracks as required by specification.
2926         (WebCore::HTMLMediaElement::removeTextTrack): Only request the 'removetracks' event if
2927         requested by caller.
2928         (WebCore::HTMLMediaElement::removeAllInbandTracks): Renamed to 'forgetResourceSpecificTracks'
2929         (WebCore::HTMLMediaElement::noneSupported): Specify that we want the 'removetracks' event
2930         fired for this use case.
2931         (WebCore::HTMLMediaElement::prepareForLoad): Switch to new 'forgetResourceSpecificTracks' name.
2932         * html/HTMLMediaElement.h:
2933         * html/track/TextTrackList.cpp:
2934         (TextTrackList::remove): Only fire the 'removetrack' event if the caller requests it.
2935         * html/track/TextTrackList.h: Add default argument to fire the 'removetrack' event
2936         when removing a track.
2937         * html/track/TrackListBase.cpp:
2938         (TrackListBase::remove): Only fire the 'removetrack' event if the caller requests it.
2939         * html/track/TrackListBase.h: Add default argument to fire the 'removetrack' event.
2940
2941 2014-03-25  David Kilzer  <ddkilzer@apple.com>
2942
2943         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
2944         <http://webkit.org/b/130713>
2945         <rdar://problem/15661876>
2946
2947         Reviewed by Darin Adler.
2948
2949         Merged from Blink (patch by Ian Beer):
2950         http://crbug.com/303657
2951         https://src.chromium.org/viewvc/blink?view=rev&revision=158938
2952
2953         Test: fast/forms/form-submission-crash-successful-submit-button.html
2954
2955         * html/HTMLFormElement.cpp:
2956         (WebCore::HTMLFormElement::submit):
2957
2958 2014-03-25  Gabor Rapcsanyi  <rgabor@webkit.org>
2959
2960         [ARM64] GNU assembler fails in TransformationMatrix::multiply
2961         https://bugs.webkit.org/show_bug.cgi?id=130454
2962
2963         Reviewed by Zoltan Herczeg.
2964
2965         Change the NEON intstructions to the proper style.
2966
2967         * platform/graphics/transforms/TransformationMatrix.cpp:
2968         (WebCore::TransformationMatrix::multiply):
2969
2970 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
2971
2972         [CSS Grid Layout] Vertical rectangles not considered as valid grid areas
2973         https://bugs.webkit.org/show_bug.cgi?id=130513
2974
2975         Reviewed by Andreas Kling.
2976
2977         Grid areas sized as vertical rectangles were incorrectly
2978         considered as invalid by the parser. That's because the condition
2979         checking that each new row was adjacent to the previous one was
2980         using the first row of the currently parsed grid area instead of
2981         the last one.
2982
2983         Test: fast/css-grid-layout/grid-template-areas-get-set.html
2984
2985         * css/CSSParser.cpp:
2986         (WebCore::CSSParser::parseGridTemplateAreas):
2987
2988 2014-03-25  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2989
2990         [GTK] Volume slider shows below the panel with videos in certain cases
2991         https://bugs.webkit.org/show_bug.cgi?id=130608
2992
2993         Reviewed by Jer Noble.
2994
2995         We need to delay the moment we check if the volume slider shows up
2996         or down. If the video was not visible, the offsets were 0 and it
2997         was forced to be shown below the panel.
2998
2999         Test: media/video-initially-hidden-volume-slider-up.html
3000
3001         * Modules/mediacontrols/mediaControlsApple.js:
3002         (Controller.prototype.createControls): Moved volumebox pseudo from
3003         the subclass. The test checks for it and it would fail in Mac.
3004         * Modules/mediacontrols/mediaControlsGtk.js:
3005         (ControllerGtk.prototype.createControls): Moved volumebox pseudo
3006         to the superclass.
3007         (ControllerGtk.prototype.handleMuteButtonMouseOver): Check if
3008         volume slider should show up or down.
3009         (ControllerGtk.prototype.updateReadyState): Removed check for
3010         volume slider direction.
3011
3012 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
3013
3014         [Win] Enable WebVTT Regions on Windows.
3015         https://bugs.webkit.org/show_bug.cgi?id=130680
3016
3017         Reviewed by Eric Carlson.
3018
3019         * DerivedSources.cpp: Add new build components.
3020         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3021         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3022
3023 2014-03-24  Simon Fraser  <simon.fraser@apple.com>
3024
3025         Remove some unnecessary includes from PlatformCALayerClient.h
3026         https://bugs.webkit.org/show_bug.cgi?id=130703
3027
3028         Reviewed by Andreas Kling.
3029         
3030         No need for all these #includes.
3031
3032         * platform/graphics/ca/PlatformCALayerClient.h:
3033
3034 2014-03-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
3035
3036         [core] FEGaussianBlur: use IntSize to simplify member function interface
3037         https://bugs.webkit.org/show_bug.cgi?id=130695
3038
3039         Reviewed by Dean Jackson.
3040
3041         By returning an IntSize to store the calculated kernel size values
3042         it is possible to have less function parameters. This patch also
3043         streamlines a bit the code in calculateUnscaledKernelSize.
3044
3045         No new tests, no change in behavior.
3046
3047         * platform/graphics/filters/FEDropShadow.cpp:
3048         (WebCore::FEDropShadow::determineAbsolutePaintRect):
3049         * platform/graphics/filters/FEGaussianBlur.cpp:
3050         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
3051         (WebCore::FEGaussianBlur::calculateKernelSize):
3052         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
3053         (WebCore::FEGaussianBlur::platformApplySoftware):
3054         * platform/graphics/filters/FEGaussianBlur.h:
3055         (if): Deleted.
3056         * platform/graphics/filters/FilterOperations.cpp:
3057         (WebCore::outsetSizeForBlur):
3058
3059 2014-03-24  Brian Burg  <bburg@apple.com>
3060
3061         Web Replay: capture and replay keyboard events
3062         https://bugs.webkit.org/show_bug.cgi?id=130314
3063
3064         Reviewed by Joseph Pecoraro.
3065
3066         Upstream support for capturing and replaying non-IME keyboard input.
3067         This works similarly to mouse events. It introduces optional fields and
3068         macros to encode/decode them.
3069
3070         Test: ManualTests/inspector/replay-keyboard-events.html
3071
3072         * replay/ReplayInputDispatchMethods.cpp:
3073         (WebCore::HandleKeyPress::dispatch):
3074         * replay/SerializationMethods.cpp:
3075         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
3076         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue): Switch existing
3077         encode/decode calls to use the shortening macros.
3078         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Added.
3079         (JSC::EncodingTraits<KeypressCommand>::decodeValue): Added.
3080         (JSC::PlatformKeyboardEventAppKit::PlatformKeyboardEventAppKit): Subclass
3081         PlatformKeyboardEvent so that we can set AppKit-specific members not
3082         initialized through the main constructors.
3083         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Added.
3084         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): Added.
3085         * replay/SerializationMethods.h:
3086         * replay/UserInputBridge.cpp:
3087         (WebCore::UserInputBridge::UserInputBridge): initialize m_state inside a guard.
3088         (WebCore::UserInputBridge::handleKeyEvent): fill in the implementation.
3089         * replay/WebInputs.json:
3090
3091 2014-03-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3092
3093         Optimizing string construction for type error in JSNavigatorCustom.cpp
3094         https://bugs.webkit.org/show_bug.cgi?id=130683
3095
3096         Reviewed by Eric Carlson.
3097
3098         * bindings/js/JSNavigatorCustom.cpp:
3099         (WebCore::JSNavigator::webkitGetUserMedia):
3100
3101 2014-03-24  Beth Dakin  <bdakin@apple.com>
3102
3103         Legacy-style scrollbars constantly redraw after scrolling
3104         https://bugs.webkit.org/show_bug.cgi?id=130699
3105
3106         Reviewed by Simon Fraser.
3107
3108         The constant re-draw was happening because we were never calling [ScrollbarPainter 
3109         setUsePresentationValue:NO]. This is a silly bug where were should have been 
3110         looking at PlatformWheelEvent::momentumPhase() instead of 
3111         PlatformWheelEvent::phase()
3112
3113         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3114         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
3115
3116 2014-03-24  Daniel Bates  <dabates@apple.com>
3117
3118         XSS Auditor doesn't block <script> injected before an existing <script>
3119         https://bugs.webkit.org/show_bug.cgi?id=130475
3120
3121         Merged from Blink (patch by Tom Sepez):
3122         https://src.chromium.org/viewvc/blink?view=rev&revision=169697
3123
3124         Tests: http/tests/security/xssAuditor/script-tag-expression-follows.html
3125                http/tests/security/xssAuditor/script-tag-near-start.html
3126
3127         * html/parser/XSSAuditor.cpp:
3128         (WebCore::startsHTMLCommentAt):
3129         (WebCore::startsSingleLineCommentAt):
3130         (WebCore::startsMultiLineCommentAt):
3131         (WebCore::startsOpeningScriptTagAt):
3132         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
3133
3134 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
3135
3136         Activate WebVTT Tests Once Merging is Complete
3137         https://bugs.webkit.org/show_bug.cgi?id=130420
3138
3139         Reviewed by Eric Carlson.
3140
3141         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
3142
3143 2014-03-24  Anders Carlsson  <andersca@apple.com>
3144
3145         Re-fix the build.
3146
3147         * WebCore.exp.in:
3148
3149 2014-03-24  Anders Carlsson  <andersca@apple.com>
3150
3151         Fix build.
3152
3153         * WebCore.exp.in:
3154         Move a CFNetwork only symbol inside the USE(CFNETWORK) section.
3155
3156 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
3157
3158         Regression: AX: Don't expose role or notifications for invalid menus
3159         https://bugs.webkit.org/show_bug.cgi?id=129814
3160
3161         Reviewed by Mario Sanchez Prada.
3162
3163         If a role=menu has no menuitem children, it should not be a menu.
3164         This was a bit tricky to implement since we need to update the role after the children are created,
3165         but it means we have to be a bit more aggressive about when to updateChildren, so that the role
3166         is known to be valid.
3167
3168         Test: platform/mac/accessibility/invalid-menu-role-does-not-send-notification.html
3169
3170         * accessibility/AXObjectCache.cpp:
3171         (WebCore::AXObjectCache::notificationPostTimerFired):
3172         * accessibility/AccessibilityRenderObject.cpp:
3173         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
3174         (WebCore::AccessibilityRenderObject::addChildren):
3175         * accessibility/AccessibilityRenderObject.h:
3176         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3177         (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
3178
3179 2014-03-24  Andy Estes  <aestes@apple.com>
3180
3181         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
3182         https://bugs.webkit.org/show_bug.cgi?id=129322
3183
3184         Reviewed by Anders Carlsson.
3185
3186         * platform/network/ResourceHandle.h:
3187         * platform/network/cf/ResourceHandleCFNet.cpp:
3188         (WebCore::ResourceHandle::releaseConnectionForDownload): Changed to
3189         return a RetainPtr that adopts the connection's retain count.
3190
3191 2014-03-24  Enrica Casucci  <enrica@apple.com>
3192
3193         Update Hindi fallback font.
3194         https://bugs.webkit.org/show_bug.cgi?id=130690
3195         <rdar://problem/16391601>
3196
3197         Reviewed by Sam Weinig.
3198
3199         Using the new available font for Hindi in the fallback list.
3200
3201         * platform/graphics/ios/FontCacheIOS.mm:
3202         (WebCore::FontCache::systemFallbackForCharacters):
3203
3204 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
3205
3206         Merge Minor WebVTT Cleanups from Blink
3207         https://bugs.webkit.org/show_bug.cgi?id=130681
3208
3209         Reviewed by Eric Carlson.
3210
3211         Merged from Blink (patch by philipj@opera.com):
3212         https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
3213         http://crbug.com/52593009
3214         https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
3215         http://crbug.com/104243003
3216
3217         * html/track/TextTrack.cpp:
3218         (WebCore::TextTrack::setMode):
3219         * html/track/TextTrack.idl:
3220         * html/track/TextTrackCue.h:
3221         * html/track/VTTCue.cpp:
3222         (WebCore::VTTCue::VTTCue):
3223         * html/track/VTTCue.h:
3224
3225 2014-03-24  Commit Queue  <commit-queue@webkit.org>
3226
3227         Unreviewed, rolling out r166169.
3228         https://bugs.webkit.org/show_bug.cgi?id=130682
3229
3230         This patch broke tests on Apple Mavericks (Requested by fredw
3231         on #webkit).
3232
3233         Reverted changeset:
3234
3235         "Operator stretching: expose a math data API"
3236         https://bugs.webkit.org/show_bug.cgi?id=130572
3237         http://trac.webkit.org/changeset/166169
3238
3239 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
3240
3241         ENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
3242         https://bugs.webkit.org/show_bug.cgi?id=130669
3243
3244         Reviewed by Sergio Villar Senin.
3245
3246         No new tests. No new functionality.
3247
3248         * css/CSSGridLineNamesValue.cpp:
3249         * css/CSSGridLineNamesValue.h:
3250
3251 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
3252
3253         <hr> should expose AXRole/AXSubrole, etc
3254         https://bugs.webkit.org/show_bug.cgi?id=109015
3255
3256         Reviewed by Mario Sanchez Prada.
3257
3258         Expose the <hr> element to Mac and iOS through the accessibility interface.
3259
3260         Test: platform/mac/accessibility/hr-element.html
3261
3262         * English.lproj/Localizable.strings:
3263         * accessibility/AccessibilityNodeObject.cpp:
3264         (WebCore::AccessibilityNodeObject::isEnabled):
3265         * accessibility/AccessibilityObject.cpp:
3266         (WebCore::AccessibilityObject::computedRoleString):
3267         * accessibility/AccessibilityRenderObject.cpp:
3268         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3269         * accessibility/atk/AccessibilityObjectAtk.cpp:
3270         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3271         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3272         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3273         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
3274         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3275         (createAccessibilityRoleMap):
3276         (-[WebAccessibilityObjectWrapper subrole]):
3277         (-[WebAccessibilityObjectWrapper roleDescription]):
3278         * platform/LocalizedStrings.cpp:
3279         (WebCore::AXHorizontalRuleDescriptionText):
3280         * platform/LocalizedStrings.h:
3281
3282 2014-03-24  Antti Koivisto  <antti@apple.com>
3283
3284         Invalidate sibling text node style when needed instead of attaching synchronously
3285         https://bugs.webkit.org/show_bug.cgi?id=130590
3286
3287         Reviewed by Andreas Kling.
3288         
3289         Make things simpler.
3290
3291         * style/StyleResolveTree.cpp:
3292         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
3293         
3294             Just invalidate instead of calling attach directly.
3295             Rename to match.
3296
3297         (WebCore::Style::textRendererIsNeeded):
3298         (WebCore::Style::createTextRendererIfNeeded):
3299         
3300             Move all testing to textRendererIsNeeded.
3301
3302         (WebCore::Style::updateTextRendererAfterContentChange):
3303         
3304             Call resolveTextNode instead of re-implementing the same thing.
3305
3306         (WebCore::Style::resolveLocal):
3307         (WebCore::Style::resolveTextNode):
3308         
3309             Avoid unnecessary reattaching.
3310             Rename for consistency.
3311
3312         (WebCore::Style::resolveShadowTree):
3313         (WebCore::Style::resolveTree):
3314         
3315 2014-03-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
3316
3317         Fix !ENABLE(VIDEO) build
3318         https://bugs.webkit.org/show_bug.cgi?id=130671
3319
3320         Reviewed by Eric Carlson.
3321
3322         Add missing ENABLE(VIDEO) guards because many functions use
3323         the newly guarded functions.
3324
3325         * testing/Internals.cpp:
3326         * testing/Internals.h:
3327         * testing/Internals.idl:
3328
3329 2014-03-24  Antti Koivisto  <antti@apple.com>
3330
3331         Text autosizing does not determine line count correctly for simple line layout
3332         https://bugs.webkit.org/show_bug.cgi?id=130673
3333
3334         Reviewed by Daniel Bates.
3335         
3336         We don't count lines correctly in simple line layout case.
3337
3338         * page/Frame.cpp:
3339         (WebCore::Frame::textAutosizingWidth):
3340         (WebCore::Frame::setTextAutosizingWidth):
3341         * page/ios/FrameIOS.mm:
3342         (WebCore::Frame::textAutosizingWidth): Deleted.
3343         (WebCore::Frame::setTextAutosizingWidth): Deleted.
3344         
3345             Move to Frame.cpp to make enabling on non-iOS build easier.
3346
3347         * rendering/RenderBlockFlow.cpp:
3348         (WebCore::RenderBlockFlow::lineCount):
3349         
3350             Handle simple line layout case.
3351
3352         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
3353             
3354             Call lineCount() if children are inline.
3355             Rename for clarity.
3356
3357         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
3358         (WebCore::RenderBlockFlow::immediateLineCount): Deleted.
3359         * rendering/RenderBlockFlow.h:
3360
3361 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
3362
3363         [regression] background colors do not apply to <mo> elements.
3364         https://bugs.webkit.org/show_bug.cgi?id=130470.
3365
3366         Test: mathml/presentation/tokenElements-background-color.html
3367
3368         * rendering/mathml/RenderMathMLOperator.cpp:
3369         (WebCore::RenderMathMLOperator::paint): always call the parent painting to draw the background.
3370         (WebCore::RenderMathMLOperator::paintChildren): move the special case for invisible operator here.
3371
3372 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
3373
3374         Operator stretching: expose a math data API
3375         https://bugs.webkit.org/show_bug.cgi?id=130572
3376
3377         Reviewed by Chris Fleizach.
3378
3379         We expose a new SimpleFontData API to give access to the data from the
3380         OpenType MATH table using a font cache. The class OpenTypeMathData will
3381         be implemented in bug 130324. On Darwin platform, we also implement the
3382         missing FontPlatformData::openTypeTable function which will be necessary
3383         to load the OpenType MATH table. The changes are intended to be used
3384         for MathML operator stretching (bug 130322) so tests are not added yet.
3385
3386         * CMakeLists.txt: add new OpenTypeMathData files.
3387         * GNUmakefile.list.am: ditto.
3388         * WebCore.vcxproj/WebCore.vcxproj: ditto.
3389         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
3390         * WebCore.xcodeproj/project.pbxproj: ditto.
3391         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
3392         We make the math and vertical data share the same key for the cache.
3393         (WebCore::fontMathDataCacheInstance):
3394         (WebCore::FontCache::getMathData):
3395         (WebCore::fontVerticalDataCacheInstance):
3396         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
3397         * platform/graphics/FontPlatformData.cpp:
3398         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
3399         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
3400         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
3401         (WebCore::SimpleFontData::SimpleFontData):
3402         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
3403         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
3404         (WebCore::OpenTypeMathData::OpenTypeMathData):
3405         * platform/graphics/opentype/OpenTypeMathData.h: Added.
3406         (WebCore::OpenTypeMathData::create):
3407         (WebCore::OpenTypeMathData::hasMathData):
3408
3409 2014-03-24  Jon Lee  <jonlee@apple.com>
3410
3411         Build fixes.
3412
3413         Unreviewed.
3414
3415         * editing/ios/EditorIOS.mm:
3416         (WebCore::Editor::writeSelectionToPasteboard): Convert to reference.
3417
3418 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
3419
3420         ENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
3421         https://bugs.webkit.org/show_bug.cgi?id=130666
3422
3423         Reviewed by Andreas Kling.
3424
3425         No new tests. No new functionality.
3426
3427         * css/CSSParserValues.cpp:
3428         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
3429
3430 2014-03-24  Javier Fernandez  <jfernandez@igalia.com>
3431
3432         [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
3433         https://bugs.webkit.org/show_bug.cgi?id=129041
3434
3435         Reviewed by Sergio Villar Senin.
3436
3437         From Blink r162555 by <svillar@igalia.com>
3438
3439         Names for grid lines are now specified as a list of whitespace separated
3440         idents enclosed in parentheses instead of as a list of strings.
3441
3442         Updated tests to match the new <grid-line> syntax.
3443
3444         * CMakeLists.txt:
3445         * GNUmakefile.list.am:
3446         * WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
3447         * css/CSSComputedStyleDeclaration.cpp:
3448         (WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
3449         * css/CSSGrammar.y.in: New syntax for named <grid-line>.
3450         * css/CSSGridLineNamesValue.cpp: Added.
3451         (WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
3452         (WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
3453         (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
3454         * css/CSSGridLineNamesValue.h: Added.
3455         (WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
3456         * css/CSSParser.cpp:
3457         (WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
3458         (WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
3459         (WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
3460         * css/CSSParser.h:
3461         * css/CSSParserValues.cpp:
3462         (WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
3463         (WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
3464         * css/CSSParserValues.h:
3465         (WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
3466         * css/CSSValue.cpp:
3467         (WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
3468         (WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
3469         (WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
3470         * css/CSSValue.h:
3471         (WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
3472         * css/StyleResolver.cpp:
3473         (WebCore::createGridTrackList): Using the new named <grid-line> syntax.
3474
3475 2014-03-23  Sam Weinig  <sam@webkit.org>
3476
3477         Convert WebHTMLConverter to C++
3478         https://bugs.webkit.org/show_bug.cgi?id=130655
3479
3480         Reviewed by Andreas Kling.
3481
3482         - Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
3483         - Removes unused members
3484             - _standardFontFamily (never assigned to)
3485             - _textSizeMultiplier (always exactly 1)
3486             - _webViewTextSizeMultiplier (always exactly 0)
3487             - _defaultFontSize (always exactly 12, changed to be constant)
3488             - _minimumFontSize (always exactly 1, changed to be constant)
3489             - _colorsForNodes (never assigned to)
3490             - _indexingLimit (always exactly 0)
3491             - _thumbnailLimit (always exactly 0)
3492             - _flags.isIndexing (always false)
3493             - _flags.isTesting (always false)
3494
3495         * editing/cocoa/HTMLConverter.mm:
3496         (HTMLConverter::convert):
3497         (HTMLConverter::HTMLConverter):
3498         (HTMLConverter::~HTMLConverter):
3499         (defaultParagraphStyle):
3500         (_childrenForNode):
3501         (HTMLConverter::_stringForNode):
3502         (HTMLConverter::_getFloat):
3503         (_webKitBundle):
3504         (HTMLConverter::_elementIsBlockLevel):
3505         (HTMLConverter::_elementHasOwnBackgroundColor):
3506         (HTMLConverter::_blockLevelElementForNode):
3507         (HTMLConverter::_colorForNode):
3508         (HTMLConverter::_computedAttributesForElement):
3509         (HTMLConverter::_attributesForElement):
3510         (HTMLConverter::_newParagraphForElement):
3511         (HTMLConverter::_newLineForElement):
3512         (HTMLConverter::_newTabForElement):
3513         (_WebMessageDocumentClass):
3514         (HTMLConverter::_addAttachmentForElement):
3515         (HTMLConverter::_addQuoteForElement):
3516         (HTMLConverter::_addValue):
3517         (HTMLConverter::_fillInBlock):
3518         (HTMLConverter::_processMetaElementWithName):
3519         (HTMLConverter::_processHeadElement):
3520         (HTMLConverter::_enterElement):
3521         (HTMLConverter::_addTableForElement):
3522         (HTMLConverter::_addTableCellForElement):
3523         (HTMLConverter::_processElement):
3524         (HTMLConverter::_addMarkersToList):
3525         (HTMLConverter::_exitElement):
3526         (HTMLConverter::_processText):
3527         (HTMLConverter::_traverseNode):
3528         (HTMLConverter::_traverseFooterNode):
3529         (HTMLConverter::_adjustTrailingNewline):
3530         (HTMLConverter::_loadFromDOMRange):
3531         (fileWrapperForURL):
3532         (fileWrapperForElement):
3533         (WebCore::attributedStringFromRange):
3534         (WebCore::editingAttributedStringFromRange):
3535
3536 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
3537
3538         Remove Dead Stores from editing directory
3539         https://bugs.webkit.org/show_bug.cgi?id=130634
3540
3541         Reviewed by Darin Adler.
3542
3543         Remove Dead Stores from editing directory which assigning a value to a variable
3544         and never reading that value.
3545
3546         * editing/ApplyStyleCommand.cpp:
3547         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
3548         * editing/markup.cpp:
3549         (WebCore::createMarkupInternal):
3550
3551 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
3552
3553         Move all EFL typedefs into EflTypedefs.h.
3554         https://bugs.webkit.org/show_bug.cgi?id=130511
3555
3556         Reviewed by Gyuyoung Kim.
3557
3558         * platform/FileSystem.h: Remove EFL typedefs.
3559         * platform/Widget.h: Ditto.
3560         * platform/efl/EflScreenUtilities.h: Ditto.
3561         * platform/graphics/Icon.h: Ditto.
3562         * platform/graphics/Image.h: Ditto.
3563         * platform/graphics/IntPoint.h: Ditto.
3564         * platform/graphics/IntRect.h: Ditto.
3565         * platform/network/NetworkStateNotifier.h: Ditto.
3566
3567 2014-03-23  Sam Weinig  <sam@webkit.org>
3568
3569         Move HTMLConverter from platform/mac to editing/cocoa.
3570
3571         Rubber-stamped by Darin Adler.
3572
3573         * WebCore.xcodeproj/project.pbxproj:
3574         * editing/cocoa: Added.
3575         * editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
3576         * editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
3577         * platform/mac/HTMLConverter.h: Removed.
3578         * platform/mac/HTMLConverter.mm: Removed.
3579
3580 2014-03-23  Sam Weinig  <sam@webkit.org>
3581
3582         Simplify the HTMLConverter interface (Part 2)
3583         https://bugs.webkit.org/show_bug.cgi?id=130654
3584
3585         Reviewed by Darin Adler.
3586
3587         Switch HTMLConverter from using an Objective-C interface to C functions.
3588
3589         * WebCore.exp.in:
3590         * editing/ios/EditorIOS.mm:
3591         (WebCore::Editor::writeSelectionToPasteboard):
3592         * editing/mac/EditorMac.mm:
3593         (WebCore::Editor::dataSelectionForPasteboard):
3594         (WebCore::Editor::writeSelectionToPasteboard):
3595         * platform/ios/PasteboardIOS.mm:
3596         * platform/mac/HTMLConverter.h:
3597         * platform/mac/HTMLConverter.mm:
3598         (WebCore::attributedStringFromRange):
3599         (WebCore::editingAttributedStringFromRange):
3600         * platform/mac/PasteboardMac.mm:
3601
3602 2014-03-23  Darin Adler  <darin@apple.com>
3603
3604         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
3605         https://bugs.webkit.org/show_bug.cgi?id=130653
3606
3607         Reviewed by Antti Koivisto.
3608
3609         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
3610         StyleResolveTree.h/cpp.
3611         * dom/ContainerNode.h: Ditto.
3612
3613         * dom/Document.cpp:
3614         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
3615         PostAttachCallbackDisabler.
3616
3617         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
3618
3619         * html/HTMLEmbedElement.cpp:
3620         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
3621         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
3622         code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
3623         do the image loading logic.
3624
3625         * html/HTMLFormControlElement.cpp:
3626         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
3627         Style::queuePostResolutionCallback and use a lambda instead of a function.
3628         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
3629         of just using wishful thinking to keep the object alive.
3630         * html/HTMLFrameOwnerElement.cpp:
3631         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
3632
3633         * html/HTMLObjectElement.cpp:
3634         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
3635         it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
3636         it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
3637         harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
3638         unconditionally and not set m_classId.
3639         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
3640         instead of classId and descendantsOfType instead of getElementsByTagName.
3641         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
3642         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
3643
3644         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
3645         attribute in a data member. Rearranged header, making more private, and fixing some typos,
3646         and doing a "using" instead of a function to disambiguate the inherited form functions.
3647
3648         * html/HTMLPlugInImageElement.cpp:
3649         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
3650         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
3651         first child of the shadow root is guaranteed to be an element.
3652         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
3653         scheduleUpdateForAfterStyleResolution function.
3654         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
3655         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
3656         class; cleaner even though it's just an assertion.
3657         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
3658         Schedules a call to updateAfterStyleResolution when needed.
3659         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
3660         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
3661         m_needsImageReload boolean in cases where no actual loading is done.
3662         (WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
3663         document once this element is removed, clears m_needsImageReload.
3664         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
3665         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
3666         (WebCore::is100Percent): Added helper to make function below more readable.
3667         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
3668         bit. The part that attracted my attention was the local variable of type RenderBox, which
3669         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
3670         is a renderer of type RenderEmbeddedObject, so depend on that.
3671         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
3672         the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
3673         When called with false, reverses the effects and stops delaying the load event.
3674
3675         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
3676         Marked more function members final. Made a protected imageLoader function so that
3677         m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
3678         as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
3679         OwnPtr, and added m_needsImageReload.
3680
3681         * style/StyleResolveTree.cpp:
3682         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
3683         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
3684         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
3685         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
3686         (WebCore::Style::postResolutionCallbackQueue): Added.
3687         (WebCore::Style::queuePostResolutionCallback): Added.
3688         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
3689         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
3690         of as a special case. It should not work for multiple documents across multiple pages instead of
3691         only the outermost one.
3692         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
3693         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
3694         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
3695         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
3696
3697         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
3698         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
3699         eventually become a private implementation detail.
3700
3701 2014-03-23  Sam Weinig  <sam@webkit.org>
3702
3703         Simplify the HTMLConverter interface (Part 1)
3704         https://bugs.webkit.org/show_bug.cgi?id=130654
3705
3706         Reviewed by Dan Bernstein.
3707
3708         Convert WebHTMLConverter's interface to only use class methods as the first
3709         step of simplifying the interface. 
3710
3711         * editing/ios/EditorIOS.mm:
3712         (WebCore::attributedStringForRange):
3713         * editing/mac/EditorMac.mm:
3714         (WebCore::attributedStringForRange):
3715         * platform/mac/HTMLConverter.h:
3716         * platform/mac/HTMLConverter.mm:
3717         (+[WebHTMLConverter attributedStringFromRange:]):
3718
3719 2014-03-23  James Craig  <jcraig@apple.com>
3720
3721         Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
3722         https://bugs.webkit.org/show_bug.cgi?id=130635
3723
3724         Reviewed by Timothy Hatcher.
3725
3726         Support for @aria-owns, @aria-controls, and @aria-flowto.
3727
3728         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
3729
3730         * inspector/InspectorDOMAgent.cpp:
3731         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
3732         * inspector/protocol/DOM.json:
3733
3734 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
3735
3736         Clean up #includes by geometry classes
3737         https://bugs.webkit.org/show_bug.cgi?id=130645
3738
3739         Reviewed by Andreas Kling.
3740
3741         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
3742         classes brings in a lot of additional headers. Fix by adding a new
3743         GeometryUtilities file so that the basic files don't need Vector,
3744         and including GeometryUtilities.h where necessary.
3745         
3746         Also forward declare PrintStream.h and only bring in the header
3747         in implementation files.
3748
3749         * CMakeLists.txt:
3750         * GNUmakefile.list.am:
3751         * WebCore.vcxproj/WebCore.vcxproj:
3752         * WebCore.vcxproj/WebCore.vcxproj.filters:
3753         * WebCore.xcodeproj/project.pbxproj:
3754         * css/CSSToStyleMap.h:
3755         * html/HTMLCanvasElement.cpp:
3756         * platform/cairo/WidgetBackingStoreCairo.h:
3757         * platform/graphics/FloatPoint.cpp:
3758         * platform/graphics/FloatPoint.h:
3759         * platform/graphics/FloatRect.cpp:
3760         * platform/graphics/FloatRect.h:
3761         * platform/graphics/FloatSize.cpp:
3762         * platform/graphics/FloatSize.h:
3763         * platform/graphics/GeometryUtilities.cpp: Added.
3764         (WebCore::findSlope):
3765         (WebCore::findIntersection):
3766         (WebCore::unionRect):
3767         (WebCore::mapRect):
3768         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
3769         * platform/graphics/IntPoint.h:
3770         * platform/graphics/IntRect.cpp:
3771         * platform/graphics/IntRect.h:
3772         * platform/graphics/IntSize.h:
3773         * platform/graphics/TextTrackRepresentation.h:
3774         * platform/graphics/Tile.h:
3775         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
3776         * platform/gtk/WidgetBackingStoreGtkX11.h:
3777         * rendering/RenderBoxModelObject.cpp:
3778         * rendering/RenderImage.cpp:
3779         * rendering/RenderObject.cpp:
3780
3781 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
3782
3783         Clean up #includes by geometry classes
3784         https://bugs.webkit.org/show_bug.cgi?id=130645
3785
3786         Reviewed by Andreas Kling.
3787
3788         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
3789         classes brings in a lot of additional headers. Fix by adding a new
3790         GeometryUtilities file so that the basic files don't need Vector,
3791         and including GeometryUtilities.h where necessary.
3792         
3793         Also forward declare PrintStream.h and only bring in the header
3794         in implementation files.
3795
3796         * CMakeLists.txt:
3797         * GNUmakefile.list.am:
3798         * WebCore.vcxproj/WebCore.vcxproj:
3799         * WebCore.vcxproj/WebCore.vcxproj.filters:
3800         * WebCore.xcodeproj/project.pbxproj:
3801         * css/CSSToStyleMap.h:
3802         * html/HTMLCanvasElement.cpp:
3803         * platform/cairo/WidgetBackingStoreCairo.h:
3804         * platform/graphics/FloatPoint.cpp:
3805         * platform/graphics/FloatPoint.h:
3806         * platform/graphics/FloatRect.cpp:
3807         * platform/graphics/FloatRect.h:
3808         * platform/graphics/FloatSize.cpp:
3809         * platform/graphics/FloatSize.h:
3810         * platform/graphics/GeometryUtilities.cpp: Added.
3811         (WebCore::findSlope):
3812         (WebCore::findIntersection):
3813         (WebCore::unionRect):
3814         (WebCore::mapRect):
3815         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
3816         * platform/graphics/IntPoint.h:
3817         * platform/graphics/IntRect.cpp:
3818         * platform/graphics/IntRect.h:
3819         * platform/graphics/IntSize.h:
3820         * platform/graphics/TextTrackRepresentation.h:
3821         * platform/graphics/Tile.h:
3822         * platform/gtk/WidgetBackingStoreGtkX11.h:
3823         * rendering/RenderBoxModelObject.cpp:
3824         * rendering/RenderImage.cpp:
3825         * rendering/RenderObject.cpp:
3826
3827 2014-03-22  Chang Shu  <cshu@webkit.org>
3828
3829         Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
3830         https://bugs.webkit.org/show_bug.cgi?id=130612.
3831
3832         Reviewed by Darin Adler.
3833
3834         Some layout tests are affected by this change but the new behavior should be correct.
3835
3836         * editing/TextIterator.cpp:
3837         (WebCore::TextIterator::handleTextNode):
3838         (WebCore::TextIterator::handleTextBox):
3839
3840 2014-03-22  Sam Weinig  <sam@webkit.org>
3841
3842         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
3843         https://bugs.webkit.org/show_bug.cgi?id=130639
3844
3845         Reviewed by Darin Adler.
3846
3847         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
3848
3849         - Removes gratuitous lookup of CSS properties that are known at compile time.
3850         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
3851           that will alway yield the same results.
3852         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
3853           but instead used the non-existent font-effect.
3854
3855         * platform/mac/HTMLConverter.mm:
3856         (HTMLConverterCaches::computedStylePropertyForElement):
3857         (HTMLConverterCaches::inlineStylePropertyForElement):
3858         (HTMLConverterCaches::propertyValueForNode):
3859         (-[WebHTMLConverter _stringForNode:property:]):
3860         (HTMLConverterCaches::floatPropertyValueForNode):
3861         (-[WebHTMLConverter _getFloat:forNode:property:]):
3862         (HTMLConverterCaches::isBlockElement):
3863         (HTMLConverterCaches::elementHasOwnBackgroundColor):
3864         (HTMLConverterCaches::colorPropertyValueForNode):
3865         (-[WebHTMLConverter _colorForNode:property:]):
3866         (-[WebHTMLConverter _computedAttributesForElement:]):
3867         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
3868         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
3869         (-[WebHTMLConverter _addTableForElement:]):
3870         (-[WebHTMLConverter _addTableCellForElement:]):
3871         (-[WebHTMLConverter _processElement:tag:display:depth:]):
3872         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
3873         (-[WebHTMLConverter _processText:]):
3874         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
3875
3876 2014-03-22  Andreas Kling  <akling@apple.com>
3877
3878         Fix debug build.
3879
3880         * bindings/js/JSDOMBinding.h:
3881         (WebCore::createWrapper):
3882
3883 2014-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3884
3885         Add *final* keyword to NavigatorContentUtils class
3886         https://bugs.webkit.org/show_bug.cgi?id=130636
3887
3888         Reviewed by Darin Adler.
3889
3890         NavigatorContentUtils won't be used as a base class. So, added final keyword.
3891
3892         No new tests, no behavior changes.
3893
3894         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
3895
3896 2014-03-22  Andreas Kling  <akling@apple.com>
3897
3898         CREATE_DOM_WRAPPER doesn't need the ExecState.
3899         <https://webkit.org/b/130648>
3900
3901         Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
3902         that we need from the global object instead.
3903
3904         toJS() and toJSNewlyCreated() still take an ExecState, that needs
3905         to be dealt with separately since some of them have scary looking
3906         currentWorld() checks.
3907
3908         Reviewed by Darin Adler.
3909
3910         * bindings/js/JSAudioContextCustom.cpp:
3911         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3912         * bindings/js/JSBlobCustom.cpp:
3913         (WebCore::toJS):
3914         (WebCore::JSBlobConstructor::constructJSBlob):
3915         * bindings/js/JSCDATASectionCustom.cpp:
3916         (WebCore::toJSNewlyCreated):
3917         * bindings/js/JSCSSRuleCustom.cpp:
3918         (WebCore::toJS):
3919         * bindings/js/JSCSSValueCustom.cpp:
3920         (WebCore::toJS):
3921         * bindings/js/JSCanvasRenderingContextCustom.cpp:
3922         (WebCore::toJS):
3923         * bindings/js/JSDOMBinding.h:
3924         (WebCore::createWrapper):
3925         (WebCore::wrap):
3926         (WebCore::createNewWrapper):
3927         * bindings/js/JSDocumentCustom.cpp:
3928         (WebCore::toJS):
3929         * bindings/js/JSElementCustom.cpp:
3930         (WebCore::toJSNewlyCreated):
3931         * bindings/js/JSEventCustom.cpp:
3932         (WebCore::toJS):
3933         * bindings/js/JSHTMLCollectionCustom.cpp:
3934         (WebCore::toJS):
3935         * bindings/js/JSHTMLTemplateElementCustom.cpp:
3936         (WebCore::JSHTMLTemplateElement::content):
3937         * bindings/js/JSIDBAnyCustom.cpp:
3938         (WebCore::toJS):
3939         * bindings/js/JSImageDataCustom.cpp:
3940         (WebCore::toJS):
3941         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
3942         (WebCore::toJS):
3943         * bindings/js/JSNodeCustom.cpp:
3944         (WebCore::createWrapperInline):
3945         * bindings/js/JSPerformanceEntryCustom.cpp:
3946         (WebCore::toJS):
3947         * bindings/js/JSRTCIceCandidateCustom.cpp:
3948         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
3949         * bindings/js/JSRTCPeerConnectionCustom.cpp:
3950         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
3951         * bindings/js/JSRTCSessionDescriptionCustom.cpp:
3952         (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
3953         * bindings/js/JSSVGPathSegCustom.cpp:
3954         (WebCore::toJS):
3955         * bindings/js/JSStyleSheetCustom.cpp:
3956         (WebCore::toJS):
3957         * bindings/js/JSTextCustom.cpp:
3958         (WebCore::toJSNewlyCreated):
3959         * bindings/js/JSTextTrackCueCustom.cpp:
3960         (WebCore::toJS):
3961         * bindings/js/JSTouchCustom.cpp:
3962         (WebCore::toJSNewlyCreated):
3963         * bindings/js/JSTouchListCustom.cpp:
3964         (WebCore::toJSNewlyCreated):
3965         * bindings/js/JSTrackCustom.cpp:
3966         (WebCore::toJS):
3967         * bindings/scripts/CodeGeneratorJS.pm:
3968         (GenerateImplementation):
3969         * dom/make_names.pl:
3970         (printWrapperFunctions):
3971         (printWrapperFactoryCppFile):
3972         (printWrapperFactoryHeaderFile):
3973
3974 2014-03-22  Michael Saboff  <msaboff@apple.com>
3975
3976         toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
3977         https://bugs.webkit.org/show_bug.cgi?id=130554
3978
3979         Reviewed by Geoffrey Garen.
3980
3981         Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
3982         Added cast from JSProxy->target() if the jsCast<>() to the native object fails
3983         in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
3984         The original cast is needed for access to the local side of the worker, while the JSProxy
3985         cast is used on the remote side of a worker.
3986
3987         Test: fast/workers/worker-strict.html
3988
3989         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3990         (WebCore::toJSDedicatedWorkerGlobalScope):
3991         (WebCore::toJSSharedWorkerGlobalScope):
3992
3993         * bindings/js/WorkerScriptController.cpp:
3994         (WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
3995         the WorkerGlobalScope object as the this object to script evaluation.
3996
3997         * workers/DedicatedWorkerGlobalScope.idl:
3998         * workers/SharedWorkerGlobalScope.idl:
3999         * workers/WorkerGlobalScope.idl:
4000         Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
4001         getting the object to use for global evaluation.
4002
4003 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
4004
4005         Some #include hygiene in Node/Element etc
4006         https://bugs.webkit.org/show_bug.cgi?id=130642
4007
4008         Reviewed by Geoffrey Garen.
4009
4010         Clean up various #includes.
4011
4012         * accessibility/AccessibilityObject.h:
4013         * bindings/js/WebCoreTypedArrayController.h:
4014         * dom/Element.h:
4015         * dom/EventListenerMap.h:
4016         * dom/EventTarget.h:
4017         * dom/Node.h:
4018         * rendering/RenderObject.h:
4019         * rendering/svg/RenderSVGRoot.h:
4020
4021 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
4022
4023         FloatRect.h on iOS should not suck in a system header
4024         https://bugs.webkit.org/show_bug.cgi?id=130641
4025
4026         Reviewed by Geoff Garen.
4027
4028         Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.
4029
4030         * platform/graphics/FloatRect.h:
4031
4032 2014-03-22  Dan Bernstein  <mitz@apple.com>
4033
4034         Fixed the iOS build.
4035
4036         Reviewed by Darin Adler.
4037
4038         * page/ios/FrameIOS.mm:
4039         (WebCore::Frame::interpretationsForCurrentRoot):
4040
4041 2014-03-22  Darin Adler  <darin@apple.com>
4042
4043         Remove String::deprecatedCharacters
4044         https://bugs.webkit.org/show_bug.cgi?id=126854
4045
4046         Reviewed by Sam Weinig.
4047
4048         * bindings/scripts/StaticString.pm:
4049         (GenerateStrings): Remove the code to generate the null m_copyData16 pointer.
4050
4051         * editing/TextIterator.cpp:
4052         (WebCore::SearchBuffer::prependContext): Changed to use the new append function in
4053         StringView.h and removed the one defined locally here.
4054