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