fc3115ee63ddd7e03742a53442f6793916dcd7ba
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-11-24  Antti Koivisto  <antti@apple.com>
2
3         Avoid String concatenation with line break iterator
4         https://bugs.webkit.org/show_bug.cgi?id=139034
5
6         Reviewed by Zalan Bujtas.
7
8         Test: fast/text/simple-lines-multiple-renderers-break.html
9
10         * rendering/SimpleLineLayoutFlowContents.cpp:
11         (WebCore::SimpleLineLayout::initializeSegments):
12
13             Include String too so it doesn't need to be fetched from the renderer.
14
15         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
16         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
17
18             Make this iterative instead of recursive.
19             Uset setPriorContext to provide previous characters instead of concatenating
20             the string from all the previous segments.
21
22         (WebCore::SimpleLineLayout::findNextNonWhitespace):
23         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
24
25             Search using segments instead of the concatenated string.
26
27         (WebCore::SimpleLineLayout::FlowContents::textWidth):
28         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow):
29         (WebCore::SimpleLineLayout::FlowContents::runWidth):
30         (WebCore::SimpleLineLayout::FlowContents::segmentForPositionSlow): Deleted.
31         (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Deleted.
32         (WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition): Deleted.
33         * rendering/SimpleLineLayoutFlowContents.h:
34         (WebCore::SimpleLineLayout::FlowContents::characterAt):
35         (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
36         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition):
37         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition):
38
39 2014-11-24  Zalan Bujtas  <zalan@apple.com>
40
41         SimpleLineLayout::canUseFor() should iterate through RenderTexts to check if their content is eligible for simple line layout.
42         https://bugs.webkit.org/show_bug.cgi?id=139007
43
44         Reviewed by Antti Koivisto.
45
46         Tests: fast/text/simple-line-layout-multiple-renderers-non-breaking-space.html
47                fast/text/simple-line-layout-multiple-renderers-with-float.html
48
49         * rendering/SimpleLineLayout.cpp:
50         (WebCore::SimpleLineLayout::canUseFor):
51
52 2014-11-22  Sam Weinig  <sam@webkit.org>
53
54         Move the '-webkit-box-reflext' CSS property to the new StyleBuilder
55         https://bugs.webkit.org/show_bug.cgi?id=139008
56
57         Reviewed by Anders Carlsson.
58
59         * css/CSSPropertyNames.in:
60         * css/StyleBuilderConverter.h:
61         (WebCore::StyleBuilderConverter::convertReflection):
62         * css/StyleResolver.cpp:
63         (WebCore::StyleResolver::applyProperty):
64
65 2014-11-24  Antti Koivisto  <antti@apple.com>
66
67         Remove unused Style struct from SimpleLineLayout.cpp
68         https://bugs.webkit.org/show_bug.cgi?id=139027
69
70         Reviewed by Sam Weinig.
71
72         It was moved to FlowContents.
73
74         * rendering/SimpleLineLayout.cpp:
75         (WebCore::SimpleLineLayout::Style::Style): Deleted.
76
77 2014-11-24  peavo@outlook.com  <peavo@outlook.com>
78
79         [Curl] Compile error in ResourceHandleManager.cpp.
80         https://bugs.webkit.org/show_bug.cgi?id=139026
81
82         Reviewed by Brent Fulgham.
83
84         The parameter types of the constructor of the Timer class has changed.
85
86         * platform/network/curl/ResourceHandleManager.cpp:
87         (WebCore::ResourceHandleManager::ResourceHandleManager):
88         (WebCore::ResourceHandleManager::downloadTimerCallback):
89         * platform/network/curl/ResourceHandleManager.h:
90
91 2014-11-24  Joanmarie Diggs  <jdiggs@igalia.com>
92
93         AX: [ATK] Unskip the skipped ATK tests in roles-exposed.html
94         https://bugs.webkit.org/show_bug.cgi?id=139016
95
96         Reviewed by Chris Fleizach.
97
98         There was one test that could not be unskipped without making a change
99         for that one to pass: mapping DocumentRegionRole to ATK_ROLE_PANEL. The
100         rest of the "fix" is just unskipping tests for ATK and updating the test
101         expectations.
102
103         No new tests needed.
104
105         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
106         (atkRole):
107
108 2014-11-23  Antti Koivisto  <antti@apple.com>
109
110         Use segment vector for FlowContents
111         https://bugs.webkit.org/show_bug.cgi?id=139015
112
113         Reviewed by Zalan Bujtas.
114
115         And FlowContents::Segment struct and use it.
116
117         * rendering/SimpleLineLayout.cpp:
118         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
119         (WebCore::SimpleLineLayout::createLineRuns):
120         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary):
121
122             Use segments.
123             If there is only one segment there is nothing to do. Bail out.
124
125         * rendering/SimpleLineLayoutFlowContents.cpp:
126         (WebCore::SimpleLineLayout::initializeSegments):
127
128             Move initialization to a function so m_segments can be const.
129             Don't add empty end segment, handle the end case in code.
130
131         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
132         (WebCore::SimpleLineLayout::FlowContents::textWidth):
133
134             Simplify and use segments.
135
136         (WebCore::SimpleLineLayout::FlowContents::segmentForPositionSlow):
137
138             Replace hand-rolled binary search with std::lower_bounds.
139
140         (WebCore::SimpleLineLayout::FlowContents::segmentForRenderer):
141         (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded):
142         (WebCore::SimpleLineLayout::FlowContents::renderer): Deleted.
143         (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): Deleted.
144         * rendering/SimpleLineLayoutFlowContents.h:
145         (WebCore::SimpleLineLayout::FlowContents::hasOneSegment):
146         (WebCore::SimpleLineLayout::FlowContents::length):
147         (WebCore::SimpleLineLayout::FlowContents::isEnd):
148         (WebCore::SimpleLineLayout::FlowContents::isEndOfContent): Deleted.
149
150             Renamed.
151
152         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition):
153
154             Inline the fast path.
155
156         * rendering/SimpleLineLayoutResolver.cpp:
157         (WebCore::SimpleLineLayout::RunResolver::Run::text):
158         (WebCore::SimpleLineLayout::RunResolver::rangeForRenderer):
159
160 2014-11-22  Simon Fraser  <simon.fraser@apple.com>
161
162         Extend WKRenderObject and WKRenderLayer with some more useful data
163         https://bugs.webkit.org/show_bug.cgi?id=139006
164
165         Reviewed by Sam Weinig.
166
167         Export WebCore::RenderLayerBacking::backingStoreMemoryEstimate() const.
168
169         * WebCore.exp.in:
170
171 2014-11-22  Antti Koivisto  <antti@apple.com>
172
173         Make locale part of the SimpleLineLayout::FlowContent::Style
174         https://bugs.webkit.org/show_bug.cgi?id=139004
175
176         Reviewed by Zalan Bujtas.
177
178         That's the only part of style not extracted out of RenderStyle in the constructor.
179
180         * rendering/SimpleLineLayoutFlowContents.cpp:
181         (WebCore::SimpleLineLayout::FlowContents::Style::Style):
182         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
183         (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded):
184         * rendering/SimpleLineLayoutFlowContents.h:
185
186             Also remove RenderBlockFlow member since it is now unused.
187
188         (WebCore::SimpleLineLayout::FlowContents::Style::Style): Deleted.
189
190             Move to cpp.
191
192 2014-11-22  Joanmarie Diggs  <jdiggs@igalia.com>
193
194         AX: [ATK] Accessible names missing for imagemap images and links
195         https://bugs.webkit.org/show_bug.cgi?id=127288
196
197         Reviewed by Chris Fleizach.
198
199         Return the alt text, if present, for the accessible name for image maps
200         and image map links for ATK. Also expose the accessible element with
201         ATK_ROLE_IMAGE_MAP instead of ATK_ROLE_IMAGE.
202
203         Test: accessibility/image-with-alt-and-map.html
204
205         * accessibility/AccessibilityObject.h:
206         (WebCore::AccessibilityObject::isImageMap):
207         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
208         (webkitAccessibleGetName):
209         (atkRole):
210
211 2014-11-22  Andreas Kling  <akling@apple.com>
212
213         Remove unused Document::ignoreAutofocus().
214         <https://webkit.org/b/139002>
215
216         Reviewed by Antti Koivisto.
217
218         No one ever actually changes this flag, so let's remove it.
219
220         * dom/Document.cpp:
221         (WebCore::Document::Document):
222         * dom/Document.h:
223         (WebCore::Document::ignoreAutofocus): Deleted.
224         (WebCore::Document::setIgnoreAutofocus): Deleted.
225         * html/HTMLFormControlElement.cpp:
226         (WebCore::shouldAutofocus):
227
228 2014-11-22  Csaba Osztrogonác  <ossy@webkit.org>
229
230         URTBF after r176459 to fix GTK build.
231
232         * platform/ScrollAnimatorNone.cpp:
233         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
234         (WebCore::ScrollAnimatorNone::requestAnimationTimerFired):
235         * platform/ScrollAnimatorNone.h:
236
237 2014-11-22  Andreas Kling  <akling@apple.com>
238
239         Convert PassRefPtr return types to RefPtr.
240         <https://webkit.org/b/138995>
241
242         Reviewed by Anders Carlsson.
243
244         Convert an assortment of DOM and HTML related functions
245         to return RefPtr instead of PassRefPtr.
246
247 2014-11-21  Jer Noble  <jer.noble@apple.com>
248
249         Unreviewed iOS build fix; move new symbols out of Mac-only exports.
250
251         * WebCore.exp.in:
252
253 2014-11-21  Timothy Horton  <timothy_horton@apple.com>
254
255         Remove a file that r176499 presumably did not mean to add.
256
257         * WebCore.exp.in.orig: Removed.
258
259 2014-11-21  Jer Noble  <jer.noble@apple.com>
260
261         Support multiple signatures of diagnostic logging.
262         https://bugs.webkit.org/show_bug.cgi?id=138690
263
264         Reviewed by Anders Carlsson.
265
266         Pull logDiagnosticMessage() out of ChromeClient and make a new client interface,
267         DiagnosticLoggingClient, which supports multiple kinds of diagnostic logging,
268         namely: simple logging without a parameter, logging with a success parameter, and
269         logging with a generic string value parameter.
270
271         * html/HTMLMediaElement.cpp:
272         (WebCore::HTMLMediaElement::parseAttribute): Use DiagnosticLoggingClient.
273         * loader/FrameLoader.cpp:
274         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Ditto.
275         * loader/SubframeLoader.cpp:
276         (WebCore::logPluginRequest): Ditto.
277         * page/ChromeClient.h:
278         (WebCore::ChromeClient::logDiagnosticMessage): Deleted.
279         * page/DiagnosticLoggingClient.h: 
280         (WebCore::DiagnosticLoggingClient::logDiagnosticMessage): Added.
281         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithResult): Added.
282         (WebCore::DiagnosticLoggingClient::logDiagnosticMessageWithValue): Added.
283         (WebCore::DiagnosticLoggingClient::~DiagnosticLoggingClient): Empty destructor.
284
285         Rename Page::PageClient to PageConfiguration, and pass that configuration from
286         Page into MainFrame upon construction.
287
288         * inspector/InspectorOverlay.cpp:
289         (WebCore::InspectorOverlay::overlayPage): Use PageConfiguration instead of PageClients.
290         * loader/EmptyClients.cpp:
291         (WebCore::fillWithEmptyClients): Ditto.
292         * loader/EmptyClients.h:
293         * page/MainFrame.cpp:
294         (WebCore::MainFrame::MainFrame): Pass loaderClientForMainFrame through to the
295             Frame constructor.
296         (WebCore::MainFrame::create): Takes a PageConfiguration.
297         * page/MainFrame.h:
298         (WebCore::MainFrame::diagnosticLoggingClient): Simple accessor.
299         * page/Page.cpp:
300         (WebCore::Page::Page):
301         (WebCore::Page::PageClients::PageClients): Deleted.
302         (WebCore::Page::PageClients::~PageClients): Deleted.
303         * page/Page.h:
304         * page/PageConfiguration.cpp: Added.
305         (WebCore::PageConfiguration::PageConfiguration): Renamed from PageClients().
306         (WebCore::PageConfiguration::~PageConfiguration): Renamed from ~PageClients().
307         * page/PageConfiguration.h: Added.
308         * svg/graphics/SVGImage.cpp:
309         (WebCore::SVGImage::dataChanged): Use PageConfiguration instead of PageClients.
310
311         Add new files and symbols to the project.
312
313         * CMakeLists.txt:
314         * WebCore.exp.in:
315         * WebCore.vcxproj/WebCore.vcxproj:
316         * WebCore.xcodeproj/project.pbxproj:
317
318 2014-11-21  Chris Dumez  <cdumez@apple.com>
319
320         Throttled DOMTimers can prevent their document from being garbage collected
321         https://bugs.webkit.org/show_bug.cgi?id=138915
322
323         Reviewed by Andreas Kling.
324
325         Throttled DOMTimers whose interval depend on viewport changes would
326         keep a Vector of elements outside viewport causing them to be throttled
327         so that we could check later on (upon scroll or layout) if those
328         elements are still outside viewport. The issue is that these elements
329         could potentially be removed from the document (and destroyed) after
330         the timer has fired. To handle this, DOMTimer was ref'ing the
331         elements. Unfortunately, this was causing us to leak the document
332         as the elements in the Vector would keep the document alive.
333
334         To handle this issue, this patch updates the DOMTimer Vector to use
335         weak pointers. The WeakPtrFactory is stored in ElementRareData to
336         avoid wasting memory for all kinds of Elements (it is a fair assumption
337         that the number of elements whose style is animated via timers is low).
338
339         Test: fast/dom/throttled-timer-running-on-document-destruction.html
340
341         * dom/Element.cpp:
342         (WebCore::Element::createWeakPtr):
343         * dom/Element.h:
344         * dom/ElementRareData.cpp:
345         * dom/ElementRareData.h:
346         (WebCore::ElementRareData::weakPtrFactory):
347         * page/DOMTimer.cpp:
348         (WebCore::DOMTimerFireState::elementsChangedOutsideViewport):
349         (WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
350         * page/DOMTimer.h:
351
352 2014-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
353
354         Unreviewed, EFL build fix since r176459.
355
356         r176459 removed Timer parameter in timer callbacks only for Mac port.
357         So this patch applies it to remaining classes for EFL port.
358
359         No new tests, fix build break.
360
361         * Modules/mediastream/RTCDTMFSender.cpp:
362         (WebCore::RTCDTMFSender::RTCDTMFSender):
363         * Modules/mediastream/RTCDataChannel.cpp:
364         (WebCore::RTCDataChannel::RTCDataChannel):
365         * Modules/mediastream/RTCPeerConnection.cpp:
366         (WebCore::RTCPeerConnection::RTCPeerConnection):
367         * Modules/vibration/Vibration.cpp:
368         (WebCore::Vibration::Vibration):
369         (WebCore::Vibration::timerFired):
370         * Modules/vibration/Vibration.h:
371         * bindings/js/GCController.cpp:
372         (WebCore::GCController::GCController):
373         * platform/efl/BatteryProviderEfl.cpp:
374         (WebCore::BatteryProviderEfl::BatteryProviderEfl):
375         (WebCore::BatteryProviderEfl::timerFired):
376         * platform/efl/BatteryProviderEfl.h:
377         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
378         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
379         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
380         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
381         * platform/graphics/texmap/TextureMapper.cpp:
382         (WebCore::BitmapTexturePool::BitmapTexturePool):
383         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
384         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
385         (WebCore::CompositingCoordinator::CompositingCoordinator):
386         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
387         * platform/graphics/texmap/coordinated/CompositingCoordinator.h:
388         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
389         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
390         (WebCore::CoordinatedGraphicsLayer::animationStartedTimerFired):
391         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
392         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
393         (WebCore::CoordinatedImageBacking::CoordinatedImageBacking):
394         (WebCore::CoordinatedImageBacking::clearContentsTimerFired):
395         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
396         * platform/mock/DeviceMotionClientMock.cpp:
397         (WebCore::DeviceMotionClientMock::DeviceMotionClientMock):
398         (WebCore::DeviceMotionClientMock::timerFired):
399         * platform/mock/DeviceMotionClientMock.h:
400         * platform/mock/TimerEventBasedMock.h:
401         (WebCore::TimerEvent::TimerEvent):
402         (WebCore::TimerEvent::timerFired):
403
404 2014-11-21  Benjamin Poulain  <bpoulain@apple.com>
405
406         Start using the new :not() and :matches() in the Web Inspector
407         https://bugs.webkit.org/show_bug.cgi?id=138978
408
409         Reviewed by Joseph Pecoraro.
410
411         There are only minor pending issues on :not() and :matches(). The feedback
412         has only been positive so far. It is time to move them out the experimental
413         flag.
414
415         * css/CSSGrammar.y.in:
416         * css/CSSParser.cpp:
417         (WebCore::CSSParser::detectFunctionTypeToken):
418         * css/CSSSelector.cpp:
419         (WebCore::simpleSelectorSpecificityInternal):
420         (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
421         (WebCore::appendSelectorList):
422         (WebCore::CSSSelector::selectorText):
423         * css/CSSSelector.h:
424         * css/SelectorChecker.cpp:
425         (WebCore::SelectorChecker::checkOne):
426         (WebCore::SelectorChecker::determineLinkMatchType):
427         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
428         * cssjit/SelectorCompiler.cpp:
429         (WebCore::SelectorCompiler::addPseudoClassType):
430
431 2014-11-21  Chris Dumez  <cdumez@apple.com>
432
433         Unreviewed, iOS build fix after r176462.
434
435         Export a few extra symbols.
436
437         * WebCore.exp.in:
438
439 2014-11-21  Chris Dumez  <cdumez@apple.com>
440
441         Properties in CSSPropertyNames.in should use the new StyleBuilder by default
442         https://bugs.webkit.org/show_bug.cgi?id=138983
443
444         Reviewed by Andreas Kling.
445
446         This patch makes using the new StyleBuilder the default and drops the
447         [NewStyleBuilder] option as a result. A new [LegacyStyleBuilder] option
448         is introduced for CSS properties that are not generated in the new
449         StyleBuilder yet.
450
451         * css/CSSPropertyNames.in:
452         * css/SVGCSSPropertyNames.in:
453         * css/makeprop.pl:
454
455 2014-11-21  Chris Dumez  <cdumez@apple.com>
456
457         [iOS] Regression(r176202): line-height is wrong on marco.org
458         https://bugs.webkit.org/show_bug.cgi?id=138970
459
460         Reviewed by Simon Fraser.
461
462         After r176202, on iOS with IOS_TEXT_AUTOSIZING enabled, we would
463         multiply the lineHeight by RenderStyle::textSizeAdjust()::multiplier()
464         unconditionally. However, we're only supposed to do so if
465         RenderStyle::textSizeAdjust()::isPercentage() returns true. This
466         patch reintroduces the textSizeAdjust().isPercentage() check that was
467         inadvertently dropped when refactoring the code to be shared between
468         iOS and OS X.
469
470         Additionally, the multiplier is only supposed the be applied if the
471         input CSSPrimitiveValue is a Length or a Number. However, after
472         r176202, we would apply the multiplier if the CSSPrimitiveValue is
473         a Percentage or a Number. This patch updates the code to match the
474         behavior prior to r176202.
475
476         Test: fast/css/line-height-text-autosizing.html
477
478         * css/StyleBuilderCustom.h:
479         (WebCore::StyleBuilderFunctions::convertLineHeight):
480         (WebCore::StyleBuilderFunctions::applyValueLineHeight):
481
482 2014-11-21  Chris Fleizach  <cfleizach@apple.com>
483
484         AX: com.apple.WebKit.WebContent crashed at WebCore: WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const
485         https://bugs.webkit.org/show_bug.cgi?id=138905
486
487         Reviewed by Mario Sanchez Prada.
488
489         The crash log indicates that m_renderer is null at the time we ask ancestorsOfType(). 
490         This is more of a speculative fix, since I am not entirely sure m_renderer is null when we enter the method.
491
492         Unable to determine cause of crash or how to reproduce on demand.
493
494         * accessibility/AccessibilityRenderObject.cpp:
495         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
496
497 2014-11-21  Jer Noble  <jer.noble@apple.com>
498
499         [EME][Mac] Check the underlying error if the one returned by AVFoundation is AVErrorUnknown.
500         https://bugs.webkit.org/show_bug.cgi?id=138986
501
502         Reviewed by Eric Carlson.
503
504         When we recieve an error with the code AVErrorUnknown, look for an underlying error from CoreMedia (or another
505         lower-level framework) with a (presumably) more informative error code, and return that code instead.
506
507         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
508         (WebCore::systemCodeForError):
509         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError):
510         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError):
511
512 2014-11-21  Chris Fleizach  <cfleizach@apple.com>
513
514         AX: Unclear that user and password are autofilled, no VoiceOver version of the yellow outline.
515         https://bugs.webkit.org/show_bug.cgi?id=138904
516
517         Reviewed by Mario Sanchez Prada.
518
519         Add an attribute that marks when a text field is auto-filled.
520
521         Test: accessibility/auto-filled-value.html
522
523         * accessibility/AccessibilityObject.cpp:
524         (WebCore::AccessibilityObject::isValueAutofilled):
525         * accessibility/AccessibilityObject.h:
526         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
527         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
528         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
529
530 2014-11-21  Andreas Kling  <akling@apple.com>
531
532         RenderElement::removeChild() doesn't need a return value.
533         <https://webkit.org/b/138985>
534
535         Reviewed by Pantti Koivisto.
536
537         Nobody uses the return value from RenderElement::removeChild().
538         Change it to return void and remove all the unnecessary plumbing.
539
540         * rendering/RenderBlock.cpp:
541         (WebCore::RenderBlock::removeChild):
542         * rendering/RenderBlock.h:
543         * rendering/RenderBlockFlow.cpp:
544         (WebCore::RenderBlockFlow::removeChild):
545         * rendering/RenderBlockFlow.h:
546         * rendering/RenderButton.cpp:
547         (WebCore::RenderButton::removeChild):
548         * rendering/RenderButton.h:
549         * rendering/RenderElement.cpp:
550         (WebCore::RenderElement::removeChild):
551         (WebCore::RenderElement::removeChildInternal):
552         * rendering/RenderElement.h:
553         * rendering/RenderMenuList.cpp:
554         (RenderMenuList::removeChild):
555         * rendering/RenderMenuList.h:
556         * rendering/RenderRuby.cpp:
557         (WebCore::RenderRubyAsInline::removeChild):
558         (WebCore::RenderRubyAsBlock::removeChild):
559         * rendering/RenderRuby.h:
560         * rendering/RenderRubyRun.cpp:
561         (WebCore::RenderRubyRun::removeChild):
562         * rendering/RenderRubyRun.h:
563         * rendering/mathml/RenderMathMLRoot.cpp:
564         (WebCore::RenderMathMLRootWrapper::removeChildWithoutRestructuring):
565         (WebCore::RenderMathMLRootWrapper::removeChild):
566         * rendering/mathml/RenderMathMLRoot.h:
567         * rendering/mathml/RenderMathMLScripts.cpp:
568         (WebCore::RenderMathMLScripts::removeChildInternal):
569         (WebCore::RenderMathMLScripts::removeChild):
570         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
571         (WebCore::RenderMathMLScriptsWrapper::removeChild):
572         * rendering/mathml/RenderMathMLScripts.h:
573         * rendering/svg/RenderSVGContainer.cpp:
574         (WebCore::RenderSVGContainer::removeChild):
575         * rendering/svg/RenderSVGContainer.h:
576         * rendering/svg/RenderSVGInline.cpp:
577         (WebCore::RenderSVGInline::removeChild):
578         * rendering/svg/RenderSVGInline.h:
579         * rendering/svg/RenderSVGRoot.cpp:
580         (WebCore::RenderSVGRoot::removeChild):
581         * rendering/svg/RenderSVGRoot.h:
582         * rendering/svg/RenderSVGText.cpp:
583         (WebCore::RenderSVGText::removeChild):
584         * rendering/svg/RenderSVGText.h:
585
586 2014-11-21  Tim Horton  <timothy_horton@apple.com>
587
588         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
589         ​https://bugs.webkit.org/show_bug.cgi?id=138960
590         <rdar://problem/19056715>
591
592         Reviewed by Anders Carlsson.
593
594         * platform/spi/mac/DataDetectorsSPI.h:
595         Add some DataDetectors SPI.
596
597 2014-11-21  Jer Noble  <jer.noble@apple.com>
598
599         [Mac] Random crashes inside media libraries when creating then destroying media quickly.
600         https://bugs.webkit.org/show_bug.cgi?id=138980
601
602         Reviewed by Eric Carlson.
603
604         Speculative fix for random crashes in the layout tests which occur randomly but regularly. The theory is
605         that creating-then-destroying our media objects too quickly triggers crashes deep within the media frameworks
606         when their initialization threads don't have a chance to complete before the main player object is destroyed.
607         Test out this theory by delaying the destruction of the AVPlayer object for 1s after its owner is destroyed.
608
609         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
610         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
611
612 2014-11-21  Jer Noble  <jer.noble@apple.com>
613
614         [Mac] Delay of 1-2s after the first paint of a video frame.
615         https://bugs.webkit.org/show_bug.cgi?id=138979
616
617         Reviewed by Eric Carlson.
618
619         Only bother waiting for a signal that a new image is ready when the image isn't ready in the first place.
620
621         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
622         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
623
624 2014-11-21  Glenn Adams  <glenn@skynav.com> and Myles C. Maxfield  <mmaxfield@apple.com>
625
626         Add support to -webkit-line-break property for CSS3 Text line-break property values and semantics.
627         https://bugs.webkit.org/show_bug.cgi?id=89235
628
629         Reviewed by Eric Seidel and Dave Hyatt.
630
631         This patch adds semantic support for the CSS3 line-break property (qua -webkit-line-break),
632         and enables testing on (apple) mac ports. Follow on patches will enable these tests on
633         other ports as they are incrementally verified.
634
635         See also wiki documentation at:
636         [1] http://trac.webkit.org/wiki/LineBreaking
637         [2] http://trac.webkit.org/wiki/LineBreakingCSS3Mapping
638
639         Tests: css3/line-break/line-break-auto-centered.html
640                css3/line-break/line-break-auto-half-kana.html
641                css3/line-break/line-break-auto-hyphens.html
642                css3/line-break/line-break-auto-inseparables.html
643                css3/line-break/line-break-auto-iteration-marks.html
644                css3/line-break/line-break-auto-postfixes.html
645                css3/line-break/line-break-auto-prefixes.html
646                css3/line-break/line-break-auto-sound-marks.html
647                css3/line-break/line-break-loose-centered.html
648                css3/line-break/line-break-loose-half-kana.html
649                css3/line-break/line-break-loose-hyphens.html
650                css3/line-break/line-break-loose-inseparables.html
651                css3/line-break/line-break-loose-iteration-marks.html
652                css3/line-break/line-break-loose-postfixes.html
653                css3/line-break/line-break-loose-prefixes.html
654                css3/line-break/line-break-loose-sound-marks.html
655                css3/line-break/line-break-normal-centered.html
656                css3/line-break/line-break-normal-half-kana.html
657                css3/line-break/line-break-normal-hyphens.html
658                css3/line-break/line-break-normal-inseparables.html
659                css3/line-break/line-break-normal-iteration-marks.html
660                css3/line-break/line-break-normal-postfixes.html
661                css3/line-break/line-break-normal-prefixes.html
662                css3/line-break/line-break-normal-sound-marks.html
663                css3/line-break/line-break-strict-centered.html
664                css3/line-break/line-break-strict-half-kana.html
665                css3/line-break/line-break-strict-hyphens.html
666                css3/line-break/line-break-strict-inseparables.html
667                css3/line-break/line-break-strict-iteration-marks.html
668                css3/line-break/line-break-strict-postfixes.html
669                css3/line-break/line-break-strict-prefixes.html
670                css3/line-break/line-break-strict-sound-marks.html
671
672         These tests were previously added in http://trac.webkit.org/changeset/143378, but skipped
673         in generic TestExpectations. In this patch, they are marked as Pass for the (apple) mac ports.
674
675         * platform/text/LineBreakIteratorPoolICU.h:
676         (WebCore::LineBreakIteratorPool::makeLocaleWithBreakKeyword):
677         Add static function to construct ICU locale argument (also used as pool key) with additional
678         break keyword.
679         (LineBreakIteratorPool):
680         (WebCore::LineBreakIteratorPool::take):
681         (WebCore::LineBreakIteratorPool::put):
682         Remove direct dependency from ICU library (and types), moving that dependency into
683         new {open,close}LineBreakIterator() functions (defined in TextBreakIteratorICU.cpp).
684         Update to take line break mode into account.
685         Create (and cache) different break iterators depending on line break mode (in addition to locale),
686         which entails expanding pool entry key format to optionally append "@break=" +
687         "loose"|"normal"|"strict" keyword to locale string.
688
689         * platform/text/TextBreakIterator.h:
690         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
691         (WebCore::LazyLineBreakIterator::isLooseCJKMode):
692         (WebCore::LazyLineBreakIterator::get):
693         (WebCore::LazyLineBreakIterator::reset):
694         (LazyLineBreakIterator):
695         Define LineBreakIteratorMode enumeration for use in TextBreakIterator et al.
696         Add state member to indicate line break mode.
697
698         * platform/text/TextBreakIteratorICU.cpp:
699         (WebCore::acquireLineBreakIterator):
700         Use new line break mode when making iterator from pool.
701         Handle change of return type of LineBreakIteratorPool::take() to non-ICU type,
702         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
703         (WebCore::releaseLineBreakIterator):
704         Handle change of parameter type of LineBreakIteratorPool::put() to non-ICU type,
705         i.e., TextBreakIterator* instead of ICU's UBreakIterator*.
706         (WebCore):
707         (WebCore::isCJKLocale):
708         New functions for determining if CJK rules apply.
709         (WebCore::openLineBreakIterator):
710         New function for abstracting opening of ICU style line break iterator. This is now
711         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
712         This function also takes into account the line break mode.
713
714         Note that this function only calls ubrk_openRules() when the author has opted-in via
715         using the -webkit-line-break CSS property. Eventually, we would like to be able to
716         customize the rules that ICU's line breaking algorithm uses (especially for CJK text);
717         however, ubrk_openRules() currently parses its input string to create a DFA and is
718         therefore very slow. In fact, it's so slow that increasing our cache size in
719         LineBreakIteratorPool doesn't actually help enough. Also note that the default value
720         for the line-break CSS property is 'auto'.
721         (WebCore::closeLineBreakIterator):
722         (WebCore::mapLineIteratorModeToRules):
723         New function for abstracting closing of ICU style line break iterator. This is now
724         used in LineBreakIteratorPoolICU.h rather than having direct ICU API dependency there.
725
726         * rendering/RenderBlockLineLayout.cpp:
727         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
728         Pass line break iterator mode flag when reseting LazyLineBreakIterator.
729         Add looseMode local variable to prevent need for computing under isBreakable().
730
731         * rendering/RenderText.cpp:
732         (WebCore::mapLineBreakToIteratorMode):
733         Add implementation for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
734         and RenderBlock::LineBreaker::nextLineBreak.
735         (WebCore):
736         (WebCore::RenderText::computePreferredLogicalWidths):
737         Ensure (lazy line) breakIterator is initialized for line break mode.
738         Ensure isBreakable() is passed loose mode flag to match behavior in RenderBlock::LineBreaker::nextLineBreak.
739
740         * rendering/RenderText.h:
741         (WebCore):
742         Add declaration for mapLineBreakToIteratorMode(), used by both RenderText::computePreferredLogicalWidths
743         and RenderBlock::LineBreaker::nextLineBreak.
744
745         * rendering/break_lines.cpp:
746         (WebCore):
747         Introduce (local) enum NBSPBehavior for expanding template on nextBreakablePosition.
748         (WebCore::isBreakableSpace):
749         Add externally specified loose mode parameter to prevent need to invoke line break iterator
750         accessor method on each invocation. Use new loose mode flavors off NBP functions.
751         (WebCore::needsLineBreakIterator):
752         Use enum NBSP behavior template parameter rather than boolean.
753         (WebCore::nextBreakablePositionNonLoosely):
754         Extend name to distinguish from loose flavor of this function.
755         (WebCore::nextBreakablePositionLoosely):
756         Add loose flavor of NBP invoked only when loose mode applies, in which case ASCII shortcut
757         table cannot be used.
758         (WebCore::nextBreakablePosition):
759         (WebCore::nextBreakablePositionIgnoringNBSP):
760         Use (renamed) non-loose flavor of NBP.
761         (WebCore::nextBreakablePositionLoose):
762         (WebCore::nextBreakablePositionIgnoringNBSPLoose):
763         Introduce loose flavor of NBP template expansions.
764
765         * rendering/break_lines.h:
766         (WebCore):
767         (WebCore::isBreakable):
768         Add externally specified loose mode parameter to prevent need to invoke line break iterator
769         accessor method on each invocation.
770
771 2014-11-21  Anders Carlsson  <andersca@apple.com>
772
773         More build fixes.
774
775         * Modules/mediastream/MediaStream.cpp:
776         (WebCore::MediaStream::MediaStream):
777
778 2014-11-21  Eric Carlson  <eric.carlson@apple.com>
779
780         [iOS] allocate volume view on the main thread
781         https://bugs.webkit.org/show_bug.cgi?id=138971
782         rdar://problem/18016958
783
784         Reviewed by Jer Noble.
785
786         * platform/audio/ios/MediaSessionManagerIOS.mm:
787         (-[WebMediaSessionHelper allocateVolumeView]): New, dispatch to the main thread if necessary before allocating
788             the volume view.
789         (-[WebMediaSessionHelper initWithCallback:]): Call allocateVolumeView.
790
791 2014-11-21  Zalan Bujtas  <zalan@apple.com>
792
793         REGRESSION(r175259) Simple line layout text measuring behavior changed.
794         https://bugs.webkit.org/show_bug.cgi?id=138947
795         rdar://problem/19050653
796
797         Reviewed by Antti Koivisto.
798
799         In certain cases, when block flow needs to compute the preferred width of a particular text
800         renderer, we use the non-simple line layout text measuring.
801         However, the same text renderer might end up at simple line layout later.
802         Complex line layout measures text including the trailing space and it subtracts
803         (the constant value of) space width afterwards, while simple line layout measures
804         runs without the extra space.
805         In such cases, this may result different word widths and produce unexpected line breaking. (preferred width != final width)
806         In long term, any text renderer qualified for simple line layout should go through the simple
807         text measuring code path. (https://bugs.webkit.org/show_bug.cgi?id=138973)
808         For now, just copy complex line layout behaviour. This also matches the previous simple line layout line breaking implementation.
809
810         Test: fast/text/simple-line-text-measuring-with-trailing-space.html
811
812         * rendering/SimpleLineLayoutFlowContents.cpp:
813         (WebCore::SimpleLineLayout::FlowContents::textWidth):
814
815 2014-11-21  Anders Carlsson  <andersca@apple.com>
816
817         More Windows build fixes.
818
819         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
820         (WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost):
821         (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
822         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h:
823         * platform/mock/GeolocationClientMock.cpp:
824         (WebCore::GeolocationClientMock::GeolocationClientMock):
825         (WebCore::GeolocationClientMock::permissionTimerFired):
826         (WebCore::GeolocationClientMock::controllerTimerFired):
827         * platform/mock/GeolocationClientMock.h:
828
829 2014-11-21  Andreas Kling  <akling@apple.com>
830
831         RenderMathMLScripts isPrescript() helper should take a reference.
832         <https://webkit.org/b/138975>
833
834         Reviewed by Antti Koivisto.
835
836         Tidy this up a bit, since it's never called with a null pointer.
837
838         * rendering/mathml/RenderMathMLScripts.cpp:
839         (WebCore::isPrescript):
840         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
841         (WebCore::RenderMathMLScripts::addChildInternal):
842         (WebCore::RenderMathMLScripts::removeChildInternal):
843         (WebCore::RenderMathMLScripts::layout):
844         (WebCore::RenderMathMLScriptsWrapper::addChildInternal):
845         (WebCore::RenderMathMLScriptsWrapper::removeChildInternal):
846
847 2014-11-21  Anders Carlsson  <andersca@apple.com>
848
849         Windows build fixes.
850
851         * plugins/PluginPackage.cpp:
852         (WebCore::PluginPackage::freeLibraryTimerFired):
853         (WebCore::PluginPackage::PluginPackage):
854         * plugins/PluginPackage.h:
855         * plugins/PluginStream.cpp:
856         (WebCore::PluginStream::PluginStream):
857         (WebCore::PluginStream::delayDeliveryTimerFired):
858         (WebCore::PluginStream::deliverData): Deleted.
859         * plugins/PluginStream.h:
860         * plugins/PluginView.cpp:
861         (WebCore::PluginView::popPopupsStateTimerFired):
862         (WebCore::PluginView::requestTimerFired):
863         (WebCore::PluginView::invalidateTimerFired):
864         (WebCore::PluginView::PluginView):
865         (WebCore::PluginView::lifeSupportTimerFired):
866         (WebCore::PluginView::performRequest): Deleted.
867         (WebCore::PluginView::setValue): Deleted.
868         (WebCore::PluginView::setParameters): Deleted.
869         (WebCore::PluginView::userAgent): Deleted.
870         * plugins/PluginView.h:
871         * plugins/win/PluginMessageThrottlerWin.cpp:
872         (WebCore::PluginMessageThrottlerWin::PluginMessageThrottlerWin):
873         (WebCore::PluginMessageThrottlerWin::messageThrottleTimerFired):
874         * plugins/win/PluginMessageThrottlerWin.h:
875
876 2014-11-21  Tim Horton  <timothy_horton@apple.com>
877
878         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
879         https://bugs.webkit.org/show_bug.cgi?id=138960
880         <rdar://problem/19056715>
881
882         Reviewed by Beth Dakin.
883
884         * platform/spi/mac/DataDetectorsSPI.h:
885         Softlink some SPI.
886
887 2014-11-21  Tim Horton  <timothy_horton@apple.com>
888
889         Move TextIndicator{Window} to WebCore
890         https://bugs.webkit.org/show_bug.cgi?id=138954
891         <rdar://problem/18992185>
892
893         Some adjustments by Csaba Osztrogonác.
894         Reviewed by Anders Carlsson.
895
896         Move TextIndicator and TextIndicatorWindow to WebCore so that both
897         WebKits can share the implementation.
898
899         * CMakeLists.txt:
900         Build TextIndicator.
901
902         * WebCore.exp.in:
903         Export TextIndicator{Window} symbols for the WebKits.
904
905         * WebCore.xcodeproj/project.pbxproj:
906         * page/TextIndicator.cpp: Renamed from Source/WebKit2/Shared/TextIndicator.cpp.
907         * page/TextIndicator.h: Renamed from Source/WebKit2/Shared/TextIndicator.h.
908         Straighforward move of TextIndicator from WebKit2, except:
909
910         Move TextIndicator::Data and TextIndicator::PresentationTransition out directly
911         into the WebCore namespace to allow for implementation of WebKit2 argument coders.
912
913         Use Image instead of ShareableBitmap internally.
914
915         Move the TextIndicatorData encode/decode to WebCoreArgumentCoders.
916         
917         * page/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.h.
918         * page/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/TextIndicatorWindow.mm.
919         Straighforward move of TextIndicatorWindow from WebKit2.
920
921 2014-11-21  Anders Carlsson  <andersca@apple.com>
922
923         Remove the Timer parameters from timer callbacks
924         https://bugs.webkit.org/show_bug.cgi?id=138974
925
926         Reviewed by Antti Koivisto.
927
928         * Modules/encryptedmedia/MediaKeySession.cpp:
929         (WebCore::MediaKeySession::MediaKeySession):
930         (WebCore::MediaKeySession::keyRequestTimerFired):
931         (WebCore::MediaKeySession::addKeyTimerFired):
932         * Modules/encryptedmedia/MediaKeySession.h:
933         * Modules/geolocation/Geolocation.cpp:
934         (WebCore::Geolocation::GeoNotifier::GeoNotifier):
935         (WebCore::Geolocation::GeoNotifier::timerFired):
936         (WebCore::Geolocation::Geolocation):
937         (WebCore::Geolocation::resumeTimerFired):
938         * Modules/geolocation/Geolocation.h:
939         * Modules/indexeddb/IDBTransactionBackend.cpp:
940         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
941         (WebCore::IDBTransactionBackend::taskTimerFired):
942         * Modules/indexeddb/IDBTransactionBackend.h:
943         * Modules/mediasource/SourceBuffer.cpp:
944         (WebCore::SourceBuffer::SourceBuffer):
945         (WebCore::SourceBuffer::appendBufferTimerFired):
946         (WebCore::SourceBuffer::removeTimerFired):
947         * Modules/mediasource/SourceBuffer.h:
948         * Modules/mediastream/MediaStream.cpp:
949         (WebCore::MediaStream::MediaStream):
950         (WebCore::MediaStream::scheduledEventTimerFired):
951         * Modules/mediastream/MediaStream.h:
952         * Modules/mediastream/RTCDTMFSender.cpp:
953         (WebCore::RTCDTMFSender::RTCDTMFSender):
954         (WebCore::RTCDTMFSender::scheduledEventTimerFired):
955         * Modules/mediastream/RTCDTMFSender.h:
956         * Modules/mediastream/RTCDataChannel.cpp:
957         (WebCore::RTCDataChannel::RTCDataChannel):
958         (WebCore::RTCDataChannel::scheduledEventTimerFired):
959         * Modules/mediastream/RTCDataChannel.h:
960         * Modules/mediastream/RTCPeerConnection.cpp:
961         (WebCore::RTCPeerConnection::RTCPeerConnection):
962         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
963         * Modules/mediastream/RTCPeerConnection.h:
964         * Modules/notifications/Notification.cpp:
965         (WebCore::Notification::Notification):
966         (WebCore::Notification::taskTimerFired):
967         * Modules/notifications/Notification.h:
968         * Modules/notifications/NotificationCenter.cpp:
969         (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback):
970         (WebCore::NotificationCenter::NotificationRequestCallback::timerFired):
971         * Modules/notifications/NotificationCenter.h:
972         * Modules/websockets/WebSocketChannel.cpp:
973         (WebCore::WebSocketChannel::WebSocketChannel):
974         (WebCore::WebSocketChannel::resumeTimerFired):
975         (WebCore::WebSocketChannel::closingTimerFired):
976         * Modules/websockets/WebSocketChannel.h:
977         * accessibility/AXObjectCache.cpp:
978         (WebCore::AXObjectCache::AXObjectCache):
979         (WebCore::AXObjectCache::notificationPostTimerFired):
980         * accessibility/AXObjectCache.h:
981         * bindings/js/GCController.cpp:
982         (WebCore::GCController::GCController):
983         (WebCore::GCController::gcTimerFired):
984         * bindings/js/GCController.h:
985         * css/CSSFontFaceSource.h:
986         * css/CSSFontSelector.cpp:
987         (WebCore::CSSFontSelector::CSSFontSelector):
988         (WebCore::CSSFontSelector::beginLoadTimerFired):
989         * css/CSSFontSelector.h:
990         * css/CSSImageGeneratorValue.cpp:
991         (WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
992         * css/StyleResolver.cpp:
993         (WebCore::StyleResolver::StyleResolver):
994         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
995         * css/StyleResolver.h:
996         * dom/Document.cpp:
997         (WebCore::Document::Document):
998         (WebCore::Document::visualUpdatesSuppressionTimerFired):
999         (WebCore::Document::styleRecalcTimerFired):
1000         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
1001         (WebCore::Document::sharedObjectPoolClearTimerFired):
1002         (WebCore::Document::updateFocusAppearanceTimerFired):
1003         (WebCore::Document::pendingTasksTimerFired):
1004         (WebCore::Document::webkitWillEnterFullScreenForElement):
1005         (WebCore::Document::webkitDidExitFullScreenForElement):
1006         (WebCore::Document::fullScreenChangeDelayTimerFired):
1007         (WebCore::Document::loadEventDelayTimerFired):
1008         (WebCore::Document::didAssociateFormControlsTimerFired):
1009         (WebCore::Document::domCookieCacheExpiryTimerFired):
1010         * dom/Document.h:
1011         * dom/EventSender.h:
1012         (WebCore::EventSender::timerFired):
1013         (WebCore::EventSender<T>::EventSender):
1014         * dom/ScriptRunner.cpp:
1015         (WebCore::ScriptRunner::ScriptRunner):
1016         (WebCore::ScriptRunner::timerFired):
1017         * dom/ScriptRunner.h:
1018         * dom/ScriptedAnimationController.cpp:
1019         (WebCore::ScriptedAnimationController::ScriptedAnimationController):
1020         (WebCore::ScriptedAnimationController::animationTimerFired):
1021         * dom/ScriptedAnimationController.h:
1022         * dom/StyledElement.cpp:
1023         (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
1024         (WebCore::PresentationAttributeCacheCleaner::cleanCache):
1025         * editing/AlternativeTextController.cpp:
1026         (WebCore::AlternativeTextController::AlternativeTextController):
1027         (WebCore::AlternativeTextController::timerFired):
1028         * editing/AlternativeTextController.h:
1029         * editing/Editor.cpp:
1030         (WebCore::Editor::Editor):
1031         (WebCore::Editor::updateEditorUINowIfScheduled):
1032         (WebCore::Editor::editorUIUpdateTimerFired):
1033         (WebCore::Editor::scanSelectionForTelephoneNumbers): Deleted.
1034         * editing/Editor.h:
1035         * editing/FrameSelection.cpp:
1036         (WebCore::FrameSelection::FrameSelection):
1037         (WebCore::FrameSelection::caretBlinkTimerFired):
1038         * editing/FrameSelection.h:
1039         * editing/SpellChecker.cpp:
1040         (WebCore::SpellChecker::SpellChecker):
1041         (WebCore::SpellChecker::timerFiredToProcessQueuedRequest):
1042         * editing/SpellChecker.h:
1043         * html/HTMLFormElement.cpp:
1044         (WebCore::HTMLFormElement::HTMLFormElement):
1045         (WebCore::HTMLFormElement::requestAutocompleteTimerFired):
1046         * html/HTMLFormElement.h:
1047         * html/HTMLMediaElement.cpp:
1048         (WebCore::HTMLMediaElement::HTMLMediaElement):
1049         (WebCore::HTMLMediaElement::parseAttribute):
1050         * html/HTMLMediaElement.h:
1051         * html/HTMLPlugInElement.cpp:
1052         (WebCore::HTMLPlugInElement::HTMLPlugInElement):
1053         (WebCore::HTMLPlugInElement::swapRendererTimerFired):
1054         * html/HTMLPlugInElement.h:
1055         * html/HTMLPlugInImageElement.cpp:
1056         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
1057         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
1058         * html/HTMLPlugInImageElement.h:
1059         * html/HTMLSourceElement.cpp:
1060         (WebCore::HTMLSourceElement::HTMLSourceElement):
1061         (WebCore::HTMLSourceElement::errorEventTimerFired):
1062         * html/HTMLSourceElement.h:
1063         * html/HTMLTrackElement.cpp:
1064         (WebCore::HTMLTrackElement::HTMLTrackElement):
1065         (WebCore::HTMLTrackElement::loadTimerFired):
1066         * html/HTMLTrackElement.h:
1067         * html/MediaController.cpp:
1068         (MediaController::MediaController):
1069         (MediaController::asyncEventTimerFired):
1070         (MediaController::clearPositionTimerFired):
1071         (MediaController::timeupdateTimerFired):
1072         * html/MediaController.h:
1073         * html/MediaDocument.cpp:
1074         (WebCore::MediaDocument::MediaDocument):
1075         (WebCore::MediaDocument::replaceMediaElementTimerFired):
1076         * html/MediaDocument.h:
1077         * html/SearchInputType.cpp:
1078         (WebCore::SearchInputType::SearchInputType):
1079         (WebCore::SearchInputType::searchEventTimerFired):
1080         * html/SearchInputType.h:
1081         * html/ValidationMessage.cpp:
1082         (WebCore::ValidationMessage::setMessage):
1083         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
1084         (WebCore::ValidationMessage::buildBubbleTree):
1085         (WebCore::ValidationMessage::requestToHideMessage):
1086         (WebCore::ValidationMessage::deleteBubbleTree):
1087         * html/ValidationMessage.h:
1088         * html/canvas/WebGLRenderingContext.cpp:
1089         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
1090         (WebCore::WebGLRenderingContext::dispatchContextLostEvent):
1091         (WebCore::WebGLRenderingContext::maybeRestoreContext):
1092         * html/canvas/WebGLRenderingContext.h:
1093         * html/parser/HTMLParserScheduler.cpp:
1094         (WebCore::HTMLParserScheduler::HTMLParserScheduler):
1095         (WebCore::HTMLParserScheduler::continueNextChunkTimerFired):
1096         * html/parser/HTMLParserScheduler.h:
1097         * html/shadow/MediaControlElements.cpp:
1098         (WebCore::MediaControlPanelElement::MediaControlPanelElement):
1099         (WebCore::MediaControlPanelElement::transitionTimerFired):
1100         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement):
1101         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
1102         * html/shadow/MediaControlElements.h:
1103         * html/shadow/MediaControls.cpp:
1104         (WebCore::MediaControls::MediaControls):
1105         (WebCore::MediaControls::hideFullscreenControlsTimerFired):
1106         * html/shadow/MediaControls.h:
1107         * html/shadow/SpinButtonElement.cpp:
1108         (WebCore::SpinButtonElement::SpinButtonElement):
1109         (WebCore::SpinButtonElement::repeatingTimerFired):
1110         * html/shadow/SpinButtonElement.h:
1111         * html/track/LoadableTextTrack.cpp:
1112         (WebCore::LoadableTextTrack::LoadableTextTrack):
1113         (WebCore::LoadableTextTrack::loadTimerFired):
1114         * html/track/LoadableTextTrack.h:
1115         * html/track/VTTRegion.cpp:
1116         (WebCore::VTTRegion::VTTRegion):
1117         (WebCore::VTTRegion::scrollTimerFired):
1118         * html/track/VTTRegion.h:
1119         * inspector/InspectorCSSAgent.cpp:
1120         (WebCore::ChangeRegionOversetTask::ChangeRegionOversetTask):
1121         (WebCore::ChangeRegionOversetTask::timerFired):
1122         * inspector/InspectorDOMAgent.cpp:
1123         (WebCore::RevalidateStyleAttributeTask::RevalidateStyleAttributeTask):
1124         (WebCore::RevalidateStyleAttributeTask::timerFired):
1125         * inspector/InspectorFrontendClientLocal.cpp:
1126         (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
1127         (WebCore::InspectorBackendDispatchTask::timerFired):
1128         * inspector/InspectorOverlay.cpp:
1129         (WebCore::InspectorOverlay::InspectorOverlay):
1130         (WebCore::InspectorOverlay::updatePaintRectsTimerFired):
1131         * inspector/InspectorOverlay.h:
1132         * loader/DocumentLoader.cpp:
1133         (WebCore::DocumentLoader::DocumentLoader):
1134         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
1135         (WebCore::DocumentLoader::handleSubstituteDataLoadSoon):
1136         (WebCore::DocumentLoader::substituteResourceDeliveryTimerFired):
1137         * loader/DocumentLoader.h:
1138         * loader/FrameLoader.cpp:
1139         (WebCore::FrameLoader::FrameLoader):
1140         (WebCore::FrameLoader::checkTimerFired):
1141         * loader/FrameLoader.h:
1142         * loader/ImageLoader.cpp:
1143         (WebCore::ImageLoader::ImageLoader):
1144         (WebCore::ImageLoader::timerFired):
1145         * loader/ImageLoader.h:
1146         * loader/LinkLoader.cpp:
1147         (WebCore::LinkLoader::LinkLoader):
1148         (WebCore::LinkLoader::linkLoadTimerFired):
1149         (WebCore::LinkLoader::linkLoadingErrorTimerFired):
1150         * loader/LinkLoader.h:
1151         * loader/NavigationScheduler.cpp:
1152         (WebCore::NavigationScheduler::NavigationScheduler):
1153         (WebCore::NavigationScheduler::timerFired):
1154         * loader/NavigationScheduler.h:
1155         * loader/PingLoader.cpp:
1156         (WebCore::PingLoader::PingLoader):
1157         * loader/PingLoader.h:
1158         (WebCore::PingLoader::timeoutTimerFired):
1159         * loader/ProgressTracker.cpp:
1160         (WebCore::ProgressTracker::ProgressTracker):
1161         (WebCore::ProgressTracker::progressHeartbeatTimerFired):
1162         * loader/ProgressTracker.h:
1163         * loader/ResourceLoadScheduler.cpp:
1164         (WebCore::ResourceLoadScheduler::ResourceLoadScheduler):
1165         (WebCore::ResourceLoadScheduler::requestTimerFired):
1166         * loader/ResourceLoadScheduler.h:
1167         * loader/TextTrackLoader.cpp:
1168         (WebCore::TextTrackLoader::TextTrackLoader):
1169         (WebCore::TextTrackLoader::cueLoadTimerFired):
1170         * loader/TextTrackLoader.h:
1171         * loader/cache/CachedResource.cpp:
1172         (WebCore::CachedResource::CachedResource):
1173         (WebCore::CachedResource::Callback::Callback):
1174         (WebCore::CachedResource::Callback::timerFired):
1175         * loader/cache/CachedResource.h:
1176         * loader/cache/CachedResourceLoader.cpp:
1177         (WebCore::CachedResourceLoader::CachedResourceLoader):
1178         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1179         * loader/cache/CachedResourceLoader.h:
1180         * loader/icon/IconDatabase.cpp:
1181         (WebCore::IconDatabase::IconDatabase):
1182         (WebCore::IconDatabase::syncTimerFired):
1183         * loader/icon/IconDatabase.h:
1184         * page/AutoscrollController.cpp:
1185         (WebCore::AutoscrollController::AutoscrollController):
1186         (WebCore::AutoscrollController::autoscrollTimerFired):
1187         * page/AutoscrollController.h:
1188         * page/CaptionUserPreferences.cpp:
1189         (WebCore::CaptionUserPreferences::CaptionUserPreferences):
1190         (WebCore::CaptionUserPreferences::timerFired):
1191         * page/CaptionUserPreferences.h:
1192         * page/CaptionUserPreferencesMediaAF.cpp:
1193         (WebCore::CaptionUserPreferencesMediaAF::CaptionUserPreferencesMediaAF):
1194         (WebCore::CaptionUserPreferencesMediaAF::updateTimerFired):
1195         * page/CaptionUserPreferencesMediaAF.h:
1196         * page/DeviceController.cpp:
1197         (WebCore::DeviceController::DeviceController):
1198         (WebCore::DeviceController::fireDeviceEvent):
1199         * page/DeviceController.h:
1200         * page/EventHandler.cpp:
1201         (WebCore::EventHandler::EventHandler):
1202         (WebCore::EventHandler::cursorUpdateTimerFired):
1203         (WebCore::EventHandler::autoHideCursorTimerFired):
1204         (WebCore::EventHandler::recognizeLongMousePress):
1205         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
1206         (WebCore::EventHandler::hoverTimerFired):
1207         * page/EventHandler.h:
1208         * page/EventSource.cpp:
1209         (WebCore::EventSource::EventSource):
1210         (WebCore::EventSource::connectTimerFired):
1211         * page/EventSource.h:
1212         * page/FocusController.cpp:
1213         (WebCore::FocusController::FocusController):
1214         (WebCore::FocusController::focusRepaintTimerFired):
1215         * page/FocusController.h:
1216         * page/Frame.cpp:
1217         (WebCore::Frame::Frame):
1218         (WebCore::Frame::overflowAutoScrollTimerFired):
1219         * page/Frame.h:
1220         * page/FrameView.cpp:
1221         (WebCore::FrameView::FrameView):
1222         (WebCore::FrameView::delayedScrollEventTimerFired):
1223         (WebCore::FrameView::speculativeTilingEnableTimerFired):
1224         (WebCore::FrameView::layoutTimerFired):
1225         (WebCore::FrameView::updateEmbeddedObjectsTimerFired):
1226         (WebCore::FrameView::flushAnyPendingPostLayoutTasks):
1227         (WebCore::FrameView::postLayoutTimerFired):
1228         * page/FrameView.h:
1229         * page/PageOverlay.cpp:
1230         (WebCore::PageOverlay::PageOverlay):
1231         (WebCore::PageOverlay::fadeAnimationTimerFired):
1232         * page/PageOverlay.h:
1233         * page/Settings.cpp:
1234         (WebCore::Settings::Settings):
1235         (WebCore::Settings::imageLoadingSettingsTimerFired):
1236         * page/Settings.h:
1237         * page/animation/AnimationController.cpp:
1238         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
1239         (WebCore::AnimationControllerPrivate::updateStyleIfNeededDispatcherFired):
1240         (WebCore::AnimationControllerPrivate::animationTimerFired):
1241         * page/animation/AnimationControllerPrivate.h:
1242         * page/mac/ServicesOverlayController.h:
1243         * page/mac/ServicesOverlayController.mm:
1244         (WebCore::ServicesOverlayController::ServicesOverlayController):
1245         (WebCore::ServicesOverlayController::determineActiveHighlightTimerFired):
1246         * page/scrolling/AsyncScrollingCoordinator.cpp:
1247         (WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
1248         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired):
1249         * page/scrolling/AsyncScrollingCoordinator.h:
1250         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
1251         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
1252         (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
1253         (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired):
1254         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1255         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1256         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
1257         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
1258         * platform/HysteresisActivity.h:
1259         (WebCore::HysteresisActivity::HysteresisActivity):
1260         (WebCore::HysteresisActivity::hysteresisTimerFired):
1261         * platform/ScrollAnimator.cpp:
1262         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
1263         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired):
1264         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired):
1265         * platform/ScrollAnimator.h:
1266         * platform/Scrollbar.cpp:
1267         (WebCore::Scrollbar::Scrollbar):
1268         (WebCore::Scrollbar::autoscrollTimerFired):
1269         * platform/Scrollbar.h:
1270         * platform/Timer.h:
1271         (WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):
1272         (WebCore::Timer::Timer): Deleted.
1273         * platform/audio/MediaSession.cpp:
1274         (WebCore::MediaSession::MediaSession):
1275         (WebCore::MediaSession::clientDataBufferingTimerFired):
1276         * platform/audio/MediaSession.h:
1277         * platform/graphics/BitmapImage.cpp:
1278         (WebCore::BitmapImage::startAnimation):
1279         (WebCore::BitmapImage::advanceAnimation):
1280         * platform/graphics/BitmapImage.h:
1281         * platform/graphics/MediaPlayer.cpp:
1282         (WebCore::MediaPlayer::MediaPlayer):
1283         (WebCore::MediaPlayer::reloadTimerFired):
1284         * platform/graphics/MediaPlayer.h:
1285         * platform/graphics/ShadowBlur.cpp:
1286         (WebCore::ScratchBuffer::ScratchBuffer):
1287         (WebCore::ScratchBuffer::timerFired):
1288         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h:
1289         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
1290         (WebCore::MediaSelectionGroupAVFObjC::MediaSelectionGroupAVFObjC):
1291         (WebCore::MediaSelectionGroupAVFObjC::selectionTimerFired):
1292         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1293         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1294         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1295         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired):
1296         * platform/graphics/ca/LayerPool.cpp:
1297         (WebCore::LayerPool::LayerPool):
1298         (WebCore::LayerPool::pruneTimerFired):
1299         * platform/graphics/ca/LayerPool.h:
1300         * platform/graphics/ca/TileController.cpp:
1301         (WebCore::TileController::TileController):
1302         (WebCore::TileController::tileRevalidationTimerFired):
1303         * platform/graphics/ca/TileController.h:
1304         * platform/graphics/ca/TileGrid.cpp:
1305         (WebCore::TileGrid::TileGrid):
1306         (WebCore::TileGrid::cohortRemovalTimerFired):
1307         * platform/graphics/ca/TileGrid.h:
1308         * platform/graphics/cg/IOSurfacePool.cpp:
1309         (WebCore::IOSurfacePool::IOSurfacePool):
1310         (WebCore::IOSurfacePool::collectionTimerFired):
1311         * platform/graphics/cg/IOSurfacePool.h:
1312         * platform/graphics/cg/SubimageCacheWithTimer.cpp:
1313         (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
1314         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1315         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1316         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
1317         (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
1318         * platform/ios/LegacyTileCache.h:
1319         * platform/ios/LegacyTileCache.mm:
1320         (WebCore::LegacyTileCache::LegacyTileCache):
1321         (WebCore::LegacyTileCache::tileCreationTimerFired):
1322         * platform/mac/HIDGamepadProvider.cpp:
1323         (WebCore::HIDGamepadProvider::HIDGamepadProvider):
1324         (WebCore::HIDGamepadProvider::connectionDelayTimerFired):
1325         (WebCore::HIDGamepadProvider::inputNotificationTimerFired):
1326         * platform/mac/HIDGamepadProvider.h:
1327         * platform/mac/ScrollAnimatorMac.h:
1328         * platform/mac/ScrollAnimatorMac.mm:
1329         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1330         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
1331         (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
1332         (WebCore::ScrollAnimatorMac::sendContentAreaScrolledTimerFired):
1333         * platform/mock/DeviceOrientationClientMock.cpp:
1334         (WebCore::DeviceOrientationClientMock::DeviceOrientationClientMock):
1335         (WebCore::DeviceOrientationClientMock::timerFired):
1336         * platform/mock/DeviceOrientationClientMock.h:
1337         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
1338         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
1339         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
1340         * platform/mock/PlatformSpeechSynthesizerMock.h:
1341         * platform/network/DNSResolveQueue.cpp:
1342         (WebCore::DNSResolveQueue::DNSResolveQueue):
1343         (WebCore::DNSResolveQueue::timerFired):
1344         * platform/network/DNSResolveQueue.h:
1345         * platform/network/NetworkStateNotifier.h:
1346         * platform/network/ResourceHandle.cpp:
1347         (WebCore::ResourceHandle::failureTimerFired):
1348         * platform/network/ResourceHandle.h:
1349         * platform/network/ResourceHandleInternal.h:
1350         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1351         * platform/network/mac/NetworkStateNotifierMac.cpp:
1352         (WebCore::NetworkStateNotifier::networkStateChangeTimerFired):
1353         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1354         * rendering/ImageQualityController.cpp:
1355         (WebCore::ImageQualityController::ImageQualityController):
1356         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1357         * rendering/ImageQualityController.h:
1358         * rendering/RenderButton.cpp:
1359         (WebCore::RenderButton::styleDidChange):
1360         (WebCore::RenderButton::timerFired):
1361         * rendering/RenderButton.h:
1362         * rendering/RenderLayerCompositor.cpp:
1363         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
1364         (WebCore::RenderLayerCompositor::updateCompositingLayersTimerFired):
1365         (WebCore::RenderLayerCompositor::layerFlushTimerFired):
1366         (WebCore::RenderLayerCompositor::paintRelatedMilestonesTimerFired):
1367         * rendering/RenderLayerCompositor.h:
1368         * rendering/RenderMarquee.cpp:
1369         (WebCore::RenderMarquee::RenderMarquee):
1370         (WebCore::RenderMarquee::timerFired):
1371         * rendering/RenderMarquee.h:
1372         * rendering/RenderNamedFlowThread.cpp:
1373         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1374         (WebCore::RenderNamedFlowThread::regionOversetChangeEventTimerFired):
1375         * rendering/RenderNamedFlowThread.h:
1376         * rendering/RenderProgress.cpp:
1377         (WebCore::RenderProgress::RenderProgress):
1378         (WebCore::RenderProgress::animationTimerFired):
1379         * rendering/RenderProgress.h:
1380         * rendering/RenderView.cpp:
1381         (WebCore::RenderView::RenderView):
1382         (WebCore::RenderView::lazyRepaintTimerFired):
1383         * rendering/RenderView.h:
1384         * replay/EventLoopInputDispatcher.cpp:
1385         (WebCore::EventLoopInputDispatcher::EventLoopInputDispatcher):
1386         (WebCore::EventLoopInputDispatcher::timerFired):
1387         * replay/EventLoopInputDispatcher.h:
1388         * storage/StorageAreaImpl.cpp:
1389         (WebCore::StorageAreaImpl::StorageAreaImpl):
1390         (WebCore::StorageAreaImpl::closeDatabaseTimerFired):
1391         (WebCore::StorageAreaImpl::closeDatabaseIfIdle):
1392         * storage/StorageAreaImpl.h:
1393         * storage/StorageAreaSync.cpp:
1394         (WebCore::StorageAreaSync::StorageAreaSync):
1395         (WebCore::StorageAreaSync::scheduleFinalSync):
1396         (WebCore::StorageAreaSync::syncTimerFired):
1397         (WebCore::StorageAreaSync::scheduleSync):
1398         * storage/StorageAreaSync.h:
1399         * svg/SVGElement.cpp:
1400         (WebCore::SVGElement::svgLoadEventTimerFired):
1401         * svg/SVGElement.h:
1402         * svg/SVGScriptElement.cpp:
1403         (WebCore::SVGScriptElement::SVGScriptElement):
1404         * svg/SVGStyleElement.cpp:
1405         (WebCore::SVGStyleElement::SVGStyleElement):
1406         * svg/SVGUseElement.cpp:
1407         (WebCore::SVGUseElement::SVGUseElement):
1408         * svg/animation/SMILTimeContainer.cpp:
1409         (WebCore::SMILTimeContainer::SMILTimeContainer):
1410         (WebCore::SMILTimeContainer::timerFired):
1411         * svg/animation/SMILTimeContainer.h:
1412         * xml/XMLHttpRequestProgressEventThrottle.cpp:
1413         (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
1414         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchDeferredEvents):
1415         * xml/XMLHttpRequestProgressEventThrottle.h:
1416
1417 2014-11-21  Chris Dumez  <cdumez@apple.com>
1418
1419         Crash when setting 'transition-delay' CSS property to a calculated value
1420         https://bugs.webkit.org/show_bug.cgi?id=138784
1421
1422         Reviewed by Sam Weinig.
1423
1424         Update CSSPrimitiveValue::computeTime() to use primitiveType() instead
1425         of m_primitiveUnitType so that it properly handles calculated values.
1426         Without this, we would hit the ASSERT_NOT_REACHED() assertion in
1427         computeTime() for calculated values.
1428
1429         Test: fast/css/transition-delay-calculated-value.html
1430
1431         * css/CSSPrimitiveValue.h:
1432         (WebCore::CSSPrimitiveValue::computeTime):
1433
1434 2014-11-21  Chris Dumez  <cdumez@apple.com>
1435
1436         Regression(r175381): -webkit-mask-box-image is broken
1437         https://bugs.webkit.org/show_bug.cgi?id=138969
1438         <rdar://problem/19054471>
1439
1440         Reviewed by Simon Fraser.
1441
1442         After r175381, the StyleBuilder would call NinePieceImage::setMaskDefaults()
1443         *after* calling CSSToStyleMap::mapNinePieceImage(), instead of *before*, for
1444         -webkit-mask-box-image CSS property. This was causing the mask defaults to
1445         overwrite what was set by mapNinePieceImage().
1446
1447         Test: fast/css/webkit-mask-box-image.html
1448
1449         * css/StyleBuilderConverter.h:
1450         (WebCore::StyleBuilderConverter::convertBorderMask):
1451
1452 2014-11-21  Chris Dumez  <cdumez@apple.com>
1453
1454         Crash when setting 'font' CSS property to 'calc(2 * 3)'
1455         https://bugs.webkit.org/show_bug.cgi?id=138933
1456
1457         Reviewed by Darin Adler.
1458
1459         The CSS Parser was not handling calculated values when parsing the font
1460         weight. This would lead us to hit an assertion when parsing a font
1461         property whose weight is set to a calculated value.
1462
1463         This patch updates parseFontWeight() to properly handle calculated
1464         values.
1465
1466         Test: fast/css/font-calculated-value.html
1467
1468         * css/CSSParser.cpp:
1469         (WebCore::CSSParser::parseFontWeight):
1470
1471 2014-11-21  Bear Travis  <betravis@gmail.com>
1472
1473         [CSS Font Loading] Switch to dispatching events asynchronously
1474         https://bugs.webkit.org/show_bug.cgi?id=138755
1475
1476         Reviewed by Simon Fraser.
1477
1478         Moving FontLoader to dispatch events and notify callbacks similarly
1479         to EventSender or the GenericEventQueue. Several bugs have popped
1480         up in the past because FontLoader has been sending events during
1481         layout, and there is no need for that to be the case.
1482
1483         Covered by existing font loader event tests. Added an additional
1484         test for the svg case, fontloader-svg-select.
1485
1486         * css/FontLoader.cpp:
1487         (WebCore::FontLoader::didLayout):
1488         (WebCore::FontLoader::timerFired): Adding asynchronous callback.
1489         (WebCore::FontLoader::scheduleEvent): Add an event to the dispatch
1490         queue.
1491         (WebCore::FontLoader::firePendingEvents): Modified to handle the
1492         loading done event and callbacks.
1493         (WebCore::FontLoader::loadingDone): Modified to spin up the timer
1494         rather than immediately dispatching events.
1495         * css/FontLoader.h:
1496
1497 2014-11-21  Daniel Bates  <dabates@apple.com>
1498
1499         Attempt to fix the internal Apple Mavericks build after <https://trac.webkit.org/changeset/176448>
1500         (https://bugs.webkit.org/show_bug.cgi?id=138930)
1501
1502         Declare NSCachedURLResponse SPI when building without the Apple Internal SDK and with the Apple
1503         Internal SDK when building for OS X Mavericks or earlier.
1504
1505         * platform/spi/cf/CFNetworkSPI.h:
1506
1507 2014-11-21  Anders Carlsson  <andersca@apple.com>
1508
1509         Make memoryCache() return a reference
1510         https://bugs.webkit.org/show_bug.cgi?id=138939
1511
1512         Reviewed by Antti Koivisto.
1513
1514         * inspector/InspectorPageAgent.cpp:
1515         (WebCore::InspectorPageAgent::cachedResource):
1516         * inspector/InspectorResourceAgent.cpp:
1517         (WebCore::InspectorResourceAgent::replayXHR):
1518         (WebCore::InspectorResourceAgent::setCacheDisabled):
1519         (WebCore::InspectorResourceAgent::mainFrameNavigated):
1520         * loader/DocumentLoader.cpp:
1521         (WebCore::areAllLoadersPageCacheAcceptable):
1522         (WebCore::DocumentLoader::finishedLoading):
1523         (WebCore::DocumentLoader::responseReceived):
1524         * loader/FrameLoader.cpp:
1525         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
1526         * loader/SubresourceLoader.cpp:
1527         (WebCore::SubresourceLoader::willSendRequest):
1528         (WebCore::SubresourceLoader::didReceiveResponse):
1529         (WebCore::SubresourceLoader::didFail):
1530         (WebCore::SubresourceLoader::willCancel):
1531         * loader/archive/cf/LegacyWebArchive.cpp:
1532         (WebCore::LegacyWebArchive::create):
1533         * loader/cache/CachedImage.cpp:
1534         (WebCore::CachedImage::addIncrementalDataBuffer):
1535         (WebCore::CachedImage::finishLoading):
1536         * loader/cache/CachedResource.cpp:
1537         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
1538         (WebCore::CachedResource::~CachedResource):
1539         (WebCore::CachedResource::failBeforeStarting):
1540         (WebCore::CachedResource::addClientToSet):
1541         (WebCore::CachedResource::removeClient):
1542         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
1543         (WebCore::CachedResource::setDecodedSize):
1544         (WebCore::CachedResource::setEncodedSize):
1545         (WebCore::CachedResource::didAccessDecodedData):
1546         * loader/cache/CachedResourceLoader.cpp:
1547         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
1548         (WebCore::CachedResourceLoader::requestResource):
1549         (WebCore::CachedResourceLoader::revalidateResource):
1550         (WebCore::CachedResourceLoader::loadResource):
1551         (WebCore::CachedResourceLoader::clearPreloads):
1552         (WebCore::CachedResourceLoader::printPreloadStats):
1553         * loader/cache/MemoryCache.cpp:
1554         (WebCore::memoryCache):
1555         (WebCore::MemoryCache::removeRequestFromCache):
1556         (WebCore::MemoryCache::removeRequestFromSessionCaches):
1557         * loader/cache/MemoryCache.h:
1558         * loader/cocoa/DiskCacheMonitorCocoa.mm:
1559         (WebCore::DiskCacheMonitor::resourceBecameFileBacked):
1560         * page/FrameView.cpp:
1561         (WebCore::FrameView::willPaintContents):
1562         (WebCore::FrameView::didPaintContents):
1563         * platform/MemoryPressureHandler.cpp:
1564         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
1565         * testing/Internals.cpp:
1566         (WebCore::Internals::isLoadingFromMemoryCache):
1567
1568 2014-11-21  Daniel Bates  <dabates@apple.com>
1569
1570         [iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
1571         https://bugs.webkit.org/show_bug.cgi?id=138930
1572
1573         Reviewed by Anders Carlsson.
1574
1575         * WebCore.xcodeproj/project.pbxproj: Rename header MPAVRoutingControllerSPI.h to MediaPlayerSPI.h.
1576         * loader/cocoa/SubresourceLoaderCocoa.mm: Move NSCachedURLResponse forward declarations to file
1577         CFNetworkSPI.h and include header CFNetworkSPI.h.
1578         * loader/mac/ResourceLoaderMac.mm: Ditto.
1579         * platform/audio/ios/MediaSessionManagerIOS.mm: Substitute MediaPlayerSPI.h for MPAVRoutingControllerSPI.h.
1580         * platform/spi/cf/CFNetworkSPI.h: Add more SPI.
1581         * platform/spi/cg/CoreGraphicsSPI.h: Ditto.
1582         * platform/spi/cocoa/QuartzCoreSPI.h: Ditto.
1583         * platform/spi/ios/MediaPlayerSPI.h: Renamed from Source/WebCore/platform/spi/ios/MPAVRoutingControllerSPI.h.
1584
1585 2014-11-21  Chris Fleizach  <cfleizach@apple.com>
1586
1587         AX: MathML expressions are misread by VoiceOver
1588         https://bugs.webkit.org/show_bug.cgi?id=138948
1589
1590         Reviewed by Mario Sanchez Prada.
1591
1592         The logic for deciding what's the radicand and an index was too tied to children placement.
1593         We should instead pull directly from the source.
1594
1595         Test: platform/mac/accessibility/mathml-root.html
1596
1597         * accessibility/AccessibilityRenderObject.cpp:
1598         (WebCore::AccessibilityRenderObject::mathRadicandObject):
1599         (WebCore::AccessibilityRenderObject::mathRootIndexObject):
1600         * rendering/mathml/RenderMathMLRoot.h:
1601
1602 2014-11-20  Benjamin Poulain  <bpoulain@apple.com>
1603
1604         Remove the remaining vestiges of minimal-ui
1605         https://bugs.webkit.org/show_bug.cgi?id=138890
1606
1607         Reviewed by Sam Weinig.
1608
1609         In ViewportArguments' setViewportFeature(), I skip the warning for now.
1610
1611         * WebCore.exp.in:
1612         * dom/ViewportArguments.cpp:
1613         (WebCore::setViewportFeature):
1614         * dom/ViewportArguments.h:
1615         (WebCore::ViewportArguments::ViewportArguments):
1616         (WebCore::ViewportArguments::operator==):
1617         * page/ViewportConfiguration.cpp:
1618         (WebCore::ViewportConfiguration::ViewportConfiguration):
1619         (WebCore::ViewportConfiguration::initialScale):
1620         (WebCore::ViewportConfiguration::minimumScale):
1621         (WebCore::ViewportConfiguration::updateConfiguration):
1622         (WebCore::ViewportConfiguration::viewportArgumentsLength):
1623         (WebCore::ViewportConfiguration::layoutWidth):
1624         (WebCore::ViewportConfiguration::layoutHeight):
1625         (WebCore::ViewportConfigurationTextStream::operator<<):
1626         (WebCore::ViewportConfiguration::description):
1627         (WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI): Deleted.
1628         (WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates): Deleted.
1629         (WebCore::ViewportConfiguration::resetMinimalUI): Deleted.
1630         (WebCore::ViewportConfiguration::didFinishDocumentLoad): Deleted.
1631         * page/ViewportConfiguration.h:
1632         (WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI): Deleted.
1633         (WebCore::ViewportConfiguration::usesMinimalUI): Deleted.
1634
1635 2014-11-20  Benjamin Poulain  <benjamin@webkit.org>
1636
1637         Web Inspector: do not show invalid specificity for dynamic cases of :matches()
1638         https://bugs.webkit.org/show_bug.cgi?id=138911
1639
1640         Reviewed by Joseph Pecoraro.
1641
1642         * css/CSSSelector.cpp:
1643         (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
1644         (WebCore::functionalPseudoClassStaticSpecificity):
1645         (WebCore::staticSpecificityInternal):
1646         (WebCore::CSSSelector::staticSpecificity):
1647         (WebCore::CSSSelector::specificity): Deleted.
1648         * css/CSSSelector.h:
1649         Add an additional computation path for the inspector.
1650
1651         The regular path ignores everything inside function pseudo classes.
1652         This new path takes the static specificity of the regular path, then evaluate
1653         recursively all the selector lists inside any level of :matches().
1654
1655         If two complex selector of selector list do not have the same specificity,
1656         we bail out and refuse to compute a static specificity representing the selector.
1657
1658         * inspector/InspectorStyleSheet.cpp:
1659         (WebCore::buildObjectForSelectorHelper):
1660         (WebCore::selectorsFromSource):
1661         (WebCore::InspectorStyleSheet::buildObjectForSelector):
1662         Do not add the complexity to the inspector's CSSSelector structure whenever
1663         it is dynamic.
1664
1665 2014-11-20  Benjamin Poulain  <bpoulain@apple.com>
1666
1667         Remove InspectorCSSAgent::buildArrayForRuleList()
1668         https://bugs.webkit.org/show_bug.cgi?id=138907
1669
1670         Reviewed by Andreas Kling.
1671
1672         * inspector/InspectorCSSAgent.cpp:
1673         (WebCore::InspectorCSSAgent::buildArrayForRuleList): Deleted.
1674         * inspector/InspectorCSSAgent.h:
1675
1676 2014-11-20  Zalan Bujtas  <zalan@apple.com>
1677
1678         REGRESSION (174986): CSS clip property is ignored when border-radius is present.
1679         https://bugs.webkit.org/show_bug.cgi?id=138935
1680         rdar://problem/18965984
1681
1682         Reviewed by Simon Fraser.
1683
1684         Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
1685         the same, but the clip rect has radius.
1686         Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.
1687
1688         Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html
1689
1690         * rendering/RenderLayer.cpp:
1691         (WebCore::RenderLayer::clipToRect):
1692
1693 2014-11-20  Geoffrey Garen  <ggaren@apple.com>
1694
1695         Removed the custom allocator for PODRedBlackTree
1696         https://bugs.webkit.org/show_bug.cgi?id=138942
1697
1698         Reviewed by Sam Weinig.
1699
1700         bmalloc is fast enough.
1701
1702         * WebCore.xcodeproj/project.pbxproj:
1703         * platform/PODArena.h: Removed.
1704         * platform/PODFreeListArena.h: Removed. This is the point of the patch.
1705
1706         * platform/PODIntervalTree.h:
1707         (WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
1708         of removing our custom allocator, we can no longer have a special
1709         "I'm not initialized yet" state. Instead, the tree either exists or not,
1710         like an idiomatic C++ object.
1711
1712         * platform/PODRedBlackTree.h:
1713         (WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.
1714
1715         (WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
1716         destructor because we can no longer rely on the arena destructor
1717         implicitly freeing our tree nodes.
1718
1719         Side note: This change basically removes the whole reason for having
1720         a purpose-built tree for POD data. We should probably remove this whole
1721         data structure in a follow-up patch, and just use a standard tree.
1722
1723         (WebCore::PODRedBlackTree::clear):
1724         (WebCore::PODRedBlackTree::add):
1725         (WebCore::PODRedBlackTree::remove):
1726         (WebCore::PODRedBlackTree::contains):
1727         (WebCore::PODRedBlackTree::visitInorder):
1728         (WebCore::PODRedBlackTree::size):
1729         (WebCore::PODRedBlackTree::checkInvariants):
1730         (WebCore::PODRedBlackTree::dump):
1731         (WebCore::PODRedBlackTree::deleteNode):
1732         (WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
1733         ourselves as fast allocated so we get the bmalloc goodness.
1734
1735         (WebCore::PODRedBlackTree::isInitialized): Deleted.
1736         (WebCore::PODRedBlackTree::initIfNeeded): Deleted.
1737
1738         * rendering/FloatingObjects.cpp:
1739         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
1740         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
1741         (WebCore::FloatingObjects::FloatingObjects):
1742         (WebCore::FloatingObjects::clear):
1743         (WebCore::FloatingObjects::addPlacedObject):
1744         (WebCore::FloatingObjects::removePlacedObject):
1745         (WebCore::FloatingObjects::computePlacedFloatsTree):
1746         (WebCore::FloatingObjects::placedFloatsTree):
1747         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
1748         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
1749         (WebCore::FloatingObjects::logicalLeftOffset):
1750         (WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
1751         weird behavior in which it was valid to use some of its APIs without
1752         first initializing it, but not others. It's not really possible to model
1753         that behavior with normal C++ objects that use new/delete, so instead
1754         I added some explicit NULL checks.
1755
1756         * rendering/FloatingObjects.h:
1757         * rendering/RenderFlowThread.cpp:
1758         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
1759         * rendering/RenderView.cpp:
1760         (WebCore::RenderView::intervalArena): Deleted.
1761         * rendering/RenderView.h: Removed custom-allocator-related cruft.
1762
1763 2014-11-20  Dean Jackson  <dino@apple.com>
1764
1765         Support unprefixed animation event types
1766         https://bugs.webkit.org/show_bug.cgi?id=138931
1767         <rdar://problem/18943167>
1768
1769         Reviewed by Simon Fraser.
1770
1771         Tests: animations/unprefixed-events-mixed-with-prefixed.html
1772                animations/unprefixed-events.html
1773
1774         Support the unprefixed animation event names:
1775         - animationstart (was webkitAnimationStart)
1776         - animationiteration (was webkitAnimationIteration)
1777         - animationend (was webkitAnimationEnd)
1778
1779         (Yes, event types are case sensitive and yes, this will
1780         likely cause some head-scratching as people change content)
1781
1782         The approach here is to follow what transitions does:
1783         - listener only for old event name -> fire old event name
1784         - listener for both old and new event name -> fire new event name
1785         - listener only for new event name -> fire new event name
1786
1787         That way pages that were trying to anticipate the new event name
1788         won't get duplicate events.
1789
1790         * CMakeLists.txt: Add new AnimationEvent* stuff.
1791         * DerivedSources.make: Ditto.
1792         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1793         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1794         * WebCore.xcodeproj/project.pbxproj: Ditto.
1795
1796         * bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
1797         * dom/DOMAllInOne.cpp:
1798
1799         * dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
1800         (WebCore::AnimationEventInit::AnimationEventInit):
1801         (WebCore::AnimationEvent::AnimationEvent):
1802         (WebCore::AnimationEvent::~AnimationEvent):
1803         (WebCore::AnimationEvent::animationName):
1804         (WebCore::AnimationEvent::elapsedTime):
1805         (WebCore::AnimationEvent::eventInterface):
1806         * dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
1807         * dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.
1808
1809         * dom/Document.cpp:
1810         (WebCore::Document::addListenerTypeIfNeeded): Handle new event types.
1811
1812         * dom/EventNames.h: New names.
1813         * dom/EventNames.in:
1814
1815         * dom/EventTarget.cpp:
1816         (WebCore::legacyType): Provide a mapping from the new names to the older
1817         prefixed forms.
1818
1819         * html/HTMLAttributeNames.in: Support the on* attributes, even though I
1820         hate them and wish this approach would die.
1821         * html/HTMLElement.cpp:
1822         (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
1823
1824         * page/DOMWindow.h: New names, and constructors.
1825         * page/DOMWindow.idl:
1826
1827         * page/animation/AnimationController.cpp:
1828         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.
1829
1830         * page/animation/KeyframeAnimation.cpp: Fire the new types of events.
1831         (WebCore::KeyframeAnimation::onAnimationStart):
1832         (WebCore::KeyframeAnimation::onAnimationIteration):
1833         (WebCore::KeyframeAnimation::onAnimationEnd):
1834         (WebCore::KeyframeAnimation::sendAnimationEvent):
1835
1836 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1837
1838         Remove a piece of DataDetectors SPI that we aren't using anymore
1839         https://bugs.webkit.org/show_bug.cgi?id=138917
1840
1841         Reviewed by Beth Dakin.
1842
1843         * platform/spi/mac/DataDetectorsSPI.h:
1844
1845 2014-11-20  Beth Dakin  <bdakin@apple.com>
1846
1847         Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
1848         https://bugs.webkit.org/show_bug.cgi?id=138568
1849         -and corresponding-
1850         rdar://problem/18904600
1851
1852         Reviewed by Tim Horton.
1853
1854         Add an optional parameter indicating whether or not to include images.
1855         * WebCore.exp.in:
1856         * editing/cocoa/HTMLConverter.h:
1857         * editing/cocoa/HTMLConverter.mm:
1858         (WebCore::editingAttributedStringFromRange):
1859
1860 2014-11-20  Myles C. Maxfield  <mmaxfield@apple.com>
1861
1862         Fix the !ENABLE(SVG_FONTS) build after r176276
1863         https://bugs.webkit.org/show_bug.cgi?id=138924
1864
1865         Reviewed by Csaba Osztrogonác.
1866
1867         No new tests because there is no behavior change.
1868
1869         * css/CSSFontFaceSource.cpp:
1870         (WebCore::CSSFontFaceSource::getFontData):
1871         * loader/cache/CachedResourceLoader.cpp:
1872         (WebCore::CachedResourceLoader::requestFont):
1873
1874 2014-11-19  Ada Chan  <adachan@apple.com>
1875
1876         Add a way to mute an AudioContext.
1877         https://bugs.webkit.org/show_bug.cgi?id=138104
1878
1879         Reviewed by Eric Carlson.
1880
1881         Keep a muted state in AudioDestinationNode. If m_muted is true,
1882         zero out the audio buffers.
1883
1884         No new tests, since it's difficult to test whether the audio is indeed muted.
1885
1886         * Modules/webaudio/AudioContext.cpp:
1887         (WebCore::AudioContext::AudioContext):
1888         Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly.
1889         (WebCore::AudioContext::pageMutedStateDidChange):
1890         Set the destination audio node's muted state to match the page's muted state.
1891
1892         * Modules/webaudio/AudioDestinationNode.cpp:
1893         (WebCore::AudioDestinationNode::AudioDestinationNode):
1894         Initialize m_muted.
1895         (WebCore::AudioDestinationNode::render):
1896         If m_muted is true, call AudioBus::zero() to zero out the buffers.
1897         * Modules/webaudio/AudioDestinationNode.h:
1898         (WebCore::AudioDestinationNode::setMuted):
1899         Set m_muted.
1900
1901 2014-11-20  Chris Dumez  <cdumez@apple.com>
1902
1903         Crash when destroying a Document that has a throttled timer still running
1904         https://bugs.webkit.org/show_bug.cgi?id=138914
1905
1906         Reviewed by Benjamin Poulain.
1907
1908         Upon destruction, a throttled DOMTimer whose interval depends on
1909         viewport changes will try to unregister itself from the view. It gets
1910         the view pointer from its Document. However, scriptExecutionContext()
1911         can return null if the Document is being destroyed (i.e. ~DOMTimer()
1912         is called from ~ScriptExecutionContext(), as the ScriptExecutionContext
1913         owns the DOMTimer).
1914
1915         This patch adds a null check for scriptExecutionContext() in the
1916         DOMTimer destructor to avoid this issue.
1917
1918         Test: fast/dom/throttled-timer-running-on-document-destruction.html
1919
1920         * page/DOMTimer.cpp:
1921         (WebCore::DOMTimer::~DOMTimer):
1922
1923         (WebCore::DOMTimer::unregisterForViewportChanges):
1924         Add assertion to make sure scriptExecutionContext() does not return
1925         null.
1926
1927         (WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted.
1928         Killed this function as this was dead code.
1929
1930 2014-11-20  Zalan Bujtas  <zalan@apple.com>
1931
1932         Simple line layout: Introduce text fragment continuation.
1933         https://bugs.webkit.org/show_bug.cgi?id=138274
1934
1935         This patch extends simple line layout coverage to multiple text renderers.
1936         When a particular render flow has multiple text renderers (but not any other type)
1937         then we use simple line layout to process and paint the content. -other, existing requirements still apply
1938         so that for example if the content requires decoration, we bail out of simple line layout.
1939
1940         FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
1941         so that the simple line layout parser sees it as one monolithic block of content. Run positions
1942         are all relative to the block and they get resolved to renderer's positions on demand.
1943         (painting, computing bounding rects etc)
1944
1945         Reviewed by Antti Koivisto.
1946
1947         Performance test already been added for the multiple rendere use case,
1948         correctness is covered by existing test cases.
1949         Test: fast/text/simple-lines-mutliple-renderers.html
1950
1951         * rendering/SimpleLineLayout.cpp:
1952         (WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
1953         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
1954         (WebCore::SimpleLineLayout::initializeNewLine):
1955         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
1956         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
1957         (WebCore::SimpleLineLayout::createTextRuns):
1958         (WebCore::SimpleLineLayout::create):
1959         * rendering/SimpleLineLayoutFlowContents.cpp:
1960         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
1961         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
1962         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
1963         (WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
1964         ligature which later can produce unexpected line breaks and out sync rendering in general.
1965         (WebCore::SimpleLineLayout::FlowContents::renderer): 
1966         (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
1967         (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
1968         (WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
1969         (WebCore::SimpleLineLayout::FlowContents::runWidth):
1970         * rendering/SimpleLineLayoutFlowContents.h:
1971         (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
1972         (WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
1973         * rendering/SimpleLineLayoutResolver.cpp:
1974         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1975
1976 2014-11-20  Commit Queue  <commit-queue@webkit.org>
1977
1978         Unreviewed, rolling out r176396.
1979         https://bugs.webkit.org/show_bug.cgi?id=138926
1980
1981         revealed some WebCore::BidiResolver issue. rollout this for
1982         now. (Requested by zalan on #webkit).
1983
1984         Reverted changeset:
1985
1986         "Simple line layout: Introduce text fragment continuation."
1987         https://bugs.webkit.org/show_bug.cgi?id=138274
1988         http://trac.webkit.org/changeset/176396
1989
1990 2014-11-20  Zalan Bujtas  <zalan@apple.com>
1991
1992         Simple line layout: Introduce text fragment continuation.
1993         https://bugs.webkit.org/show_bug.cgi?id=138274
1994
1995         This patch extends simple line layout coverage to multiple text renderers.
1996         When a particular render flow has multiple text renderers (but not any other type)
1997         then we use simple line layout to process and paint the content. -other, existing requirements still apply
1998         so that for example if the content requires decoration, we bail out of simple line layout.
1999
2000         FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
2001         so that the simple line layout parser sees it as one monolithic block of content. Run positions
2002         are all relative to the block and they get resolved to renderer's positions on demand.
2003         (painting, computing bounding rects etc)
2004
2005         Reviewed by Antti Koivisto.
2006
2007         Performance test already been added for the multiple rendere use case,
2008         correctness is covered by existing test cases.
2009         Test: fast/text/simple-lines-mutliple-renderers.html
2010
2011         * rendering/SimpleLineLayout.cpp:
2012         (WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
2013         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
2014         (WebCore::SimpleLineLayout::initializeNewLine):
2015         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
2016         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
2017         (WebCore::SimpleLineLayout::createTextRuns):
2018         (WebCore::SimpleLineLayout::create):
2019         * rendering/SimpleLineLayoutFlowContents.cpp:
2020         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
2021         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
2022         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
2023         (WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
2024         ligature which later can produce unexpected line breaks and out sync renderering in general.
2025         (WebCore::SimpleLineLayout::FlowContents::renderer): 
2026         (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
2027         (WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
2028         (WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
2029         (WebCore::SimpleLineLayout::FlowContents::runWidth):
2030         * rendering/SimpleLineLayoutFlowContents.h:
2031         (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
2032         (WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
2033         * rendering/SimpleLineLayoutResolver.cpp:
2034         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2035
2036 2014-11-20  peavo@outlook.com  <peavo@outlook.com>
2037
2038         [WinCairo] Compile error when GStreamer is enabled.
2039         https://bugs.webkit.org/show_bug.cgi?id=138925
2040
2041         Reviewed by Philippe Normand.
2042
2043         A guard is missing for an overridden method.
2044
2045         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2046
2047 2014-11-20  Adrian Perez de Castro  <aperez@igalia.com>
2048
2049         [GTK] Provide convenience API in DOM bindings to post messages to user message handlers
2050         https://bugs.webkit.org/show_bug.cgi?id=138871
2051
2052         Reviewed by Carlos Garcia Campos.
2053
2054         Adds a convenience function in the WebKitGTK+ DOM bindings to post
2055         messages to user message handlers in a way convenient way more
2056         convenient than using the autogenerated bindings.
2057
2058         * bindings/gobject/WebKitDOMCustom.cpp:
2059         (webkit_dom_dom_window_webkit_message_handlers_post_message):
2060         Added new convenience API function to post messages to user message
2061         handlers.
2062         * bindings/gobject/WebKitDOMCustom.h: Ditto.
2063         * bindings/gobject/WebKitDOMCustom.symbols: Ditto.
2064
2065 2014-11-12  Sergio Villar Senin  <svillar@igalia.com>
2066
2067         [CSS Grid Layout] Replace the usage of size_t by unsigned
2068         https://bugs.webkit.org/show_bug.cgi?id=136218
2069
2070         Reviewed by Benjamin Poulain.
2071
2072         In general, size_t should be used for sizes of objects in
2073         memory. We're using it to represent indexes and spans in the
2074         grid. Now that the maximum number of tracks is 1 million, it
2075         should be safe to replace them by unsigned integers.
2076
2077         No new tests as there is no change in functionality.
2078
2079         * css/CSSParser.cpp:
2080         (WebCore::CSSParser::parseGridTrackRepeatFunction):
2081         * css/StyleResolver.cpp:
2082         (WebCore::createImplicitNamedGridLinesFromGridArea):
2083         (WebCore::createGridTrackList):
2084         * rendering/RenderGrid.cpp:
2085         (WebCore::RenderGrid::GridIterator::GridIterator):
2086         (WebCore::RenderGrid::GridIterator::nextGridItem):
2087         (WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
2088         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
2089         (WebCore::RenderGrid::GridSizingData::GridSizingData):
2090         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2091         (WebCore::RenderGrid::gridTrackSize):
2092         (WebCore::RenderGrid::distributeSpaceToTracks):
2093         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
2094         (WebCore::RenderGrid::ensureGridSize):
2095         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
2096         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
2097         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
2098         (WebCore::RenderGrid::populateGridPositions):
2099         * rendering/RenderGrid.h:
2100         * rendering/style/GridCoordinate.h:
2101         (WebCore::GridSpan::integerSpan):
2102         * rendering/style/GridResolvedPosition.cpp:
2103         (WebCore::GridResolvedPosition::explicitGridColumnCount):
2104         (WebCore::GridResolvedPosition::explicitGridRowCount):
2105         (WebCore::explicitGridSizeForSide):
2106         (WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
2107         (WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
2108         (WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
2109         (WebCore::firstNamedGridLineBeforePosition):
2110         (WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
2111         (WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
2112         * rendering/style/GridResolvedPosition.h:
2113         (WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
2114         (WebCore::GridResolvedPosition::adjustGridPositionForSide):
2115         (WebCore::GridResolvedPosition::GridResolvedPosition):
2116         (WebCore::GridResolvedPosition::toInt):
2117         * rendering/style/StyleGridData.h:
2118
2119 2014-11-20  Andreas Kling  <akling@apple.com>
2120
2121         Remove "document has no sibling rules" optimization.
2122         <https://webkit.org/b/138902>
2123
2124         Reviewed by Antti Koivisto.
2125
2126         We were keeping a document-level flag to track whether there are any
2127         sibling rules in any active style sheets.
2128
2129         This information was used to do.. nothing.
2130
2131         * css/StyleResolver.h:
2132         (WebCore::StyleResolver::usesSiblingRules): Deleted.
2133         * dom/DocumentStyleSheetCollection.cpp:
2134         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
2135         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
2136         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
2137         * dom/DocumentStyleSheetCollection.h:
2138         (WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
2139         (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
2140         * mathml/MathMLMathElement.cpp:
2141         (WebCore::MathMLMathElement::insertedInto): Deleted.
2142         * mathml/MathMLMathElement.h:
2143
2144 2014-11-20  Andreas Kling  <akling@apple.com>
2145
2146         Caret renderer is always a RenderBlock.
2147         <https://webkit.org/b/138912>
2148
2149         Reviewed by Chris Dumez.
2150
2151         Tighten typing in the code that finds and deals with the renderer
2152         used to paint the caret (it's always a RenderBlock.)
2153
2154         * editing/FrameSelection.cpp:
2155         (WebCore::CaretBase::updateCaretRect):
2156         (WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
2157         (WebCore::DragCaretController::caretRenderer):
2158         (WebCore::repaintCaretForLocalRect):
2159         (WebCore::CaretBase::paintCaret):
2160         * editing/FrameSelection.h:
2161         * editing/VisiblePosition.cpp:
2162         (WebCore::VisiblePosition::absoluteCaretBounds):
2163         * editing/htmlediting.cpp:
2164         (WebCore::rendererForCaretPainting):
2165         (WebCore::localCaretRectInRendererForCaretPainting):
2166         (WebCore::absoluteBoundsForLocalCaretRect):
2167         * editing/htmlediting.h:
2168         * rendering/RenderBlock.cpp:
2169         (WebCore::RenderBlock::paintCaret):
2170
2171 2014-11-20  Antti Koivisto  <antti@apple.com>
2172
2173         REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
2174         https://bugs.webkit.org/show_bug.cgi?id=138807
2175         <rdar://problem/18829540>
2176
2177         Reviewed by Simon Fraser.
2178
2179         Animation gets paused because WebKit thinks the GIF is outside of the view.
2180
2181         * page/FrameView.cpp:
2182         (WebCore::FrameView::windowClipRect):
2183
2184         We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
2185         This matters with some WK1 API clients.
2186
2187 2014-11-19  Chris Dumez  <cdumez@apple.com>
2188
2189         Move 'clip' CSS property to the new StyleBuilder
2190         https://bugs.webkit.org/show_bug.cgi?id=138909
2191
2192         Reviewed by Andreas Kling.
2193
2194         Move 'clip' CSS property from DeprecatedStyleBuilder to the new
2195         StyleBuilder by using custom code.
2196
2197         No new tests, no behavior change.
2198
2199         * css/CSSPropertyNames.in:
2200         * css/DeprecatedStyleBuilder.cpp:
2201         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2202         (WebCore::ApplyPropertyClip::convertToLength): Deleted.
2203         (WebCore::ApplyPropertyClip::applyInheritValue): Deleted.
2204         (WebCore::ApplyPropertyClip::applyInitialValue): Deleted.
2205         (WebCore::ApplyPropertyClip::applyValue): Deleted.
2206         (WebCore::ApplyPropertyClip::createHandler): Deleted.
2207         * css/StyleBuilderCustom.h:
2208         (WebCore::StyleBuilderFunctions::applyInitialClip):
2209         (WebCore::StyleBuilderFunctions::applyInheritClip):
2210         (WebCore::StyleBuilderFunctions::applyValueClip):
2211
2212 2014-11-19  Ryuan Choi  <ryuan.choi@navercorp.com>
2213
2214         Remove dead code from TiledBackingStore
2215         https://bugs.webkit.org/show_bug.cgi?id=138864
2216
2217         Reviewed by Andreas Kling.
2218
2219         Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used.
2220
2221         No new tests, no behavior change.
2222
2223         * platform/graphics/TiledBackingStore.cpp:
2224         (WebCore::TiledBackingStore::TiledBackingStore):
2225         (WebCore::TiledBackingStore::setTileSize):
2226         (WebCore::TiledBackingStore::invalidate):
2227         (WebCore::TiledBackingStore::createTiles):
2228         (WebCore::TiledBackingStore::paint): Deleted.
2229         (WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted.
2230         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted.
2231         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted.
2232         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted.
2233         * platform/graphics/TiledBackingStore.h:
2234         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted.
2235
2236 2014-11-19  Andreas Kling  <akling@apple.com>
2237
2238         Remove "document has no ::before and/or ::after rules" optimization.
2239         <https://webkit.org/b/138897>
2240
2241         Reviewed by Antti Koivisto.
2242
2243         This optimization has been dead for a long time, since the default UA
2244         style contains both ::before and ::after rules.
2245
2246         * css/RuleFeature.cpp:
2247         (WebCore::recursivelyCollectFeaturesFromSelector):
2248         (WebCore::RuleFeatureSet::add):
2249         (WebCore::RuleFeatureSet::clear):
2250         * css/RuleFeature.h:
2251         (WebCore::RuleFeatureSet::RuleFeatureSet):
2252         * css/StyleResolver.h:
2253         (WebCore::StyleResolver::usesBeforeAfterRules): Deleted.
2254         * dom/DocumentStyleSheetCollection.cpp:
2255         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
2256         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
2257         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
2258         * dom/DocumentStyleSheetCollection.h:
2259         (WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted.
2260         (WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted.
2261         * html/HTMLQuoteElement.cpp:
2262         (WebCore::HTMLQuoteElement::insertedInto): Deleted.
2263         * html/HTMLQuoteElement.h:
2264         * style/StyleResolveTree.cpp:
2265         (WebCore::Style::needsPseudoElement):
2266
2267 2014-11-19  Myles C. Maxfield  <mmaxfield@apple.com>
2268
2269         [OS X] Upright vertical text is completely broken for multi-code-unit codepoints
2270         https://bugs.webkit.org/show_bug.cgi?id=138891
2271
2272         Reviewed by Dan Bernstein.
2273
2274         We were assuming that we can use the string index (in UTF-16) as the glyph
2275         index. This falls down when a single codepoint (and glyph) contians
2276         multiple code units.
2277
2278         Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html
2279
2280         * platform/graphics/GlyphPage.h:
2281         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2282         (WebCore::GlyphPage::fill):
2283
2284 2014-11-19  Daniel Bates  <dabates@apple.com>
2285
2286         Attempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org/changeset/176347>
2287         (https://bugs.webkit.org/show_bug.cgi?id=136863)
2288
2289         Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without
2290         the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier.
2291
2292         * platform/spi/cf/CFNetworkSPI.h:
2293
2294 2014-11-16  Sam Weinig  <sam@webkit.org>
2295
2296         Move the 'quotes' CSS property to the new StyleBuilder
2297         https://bugs.webkit.org/show_bug.cgi?id=138788
2298
2299         Reviewed by Chris Dumez.
2300
2301         Test: fast/css/content/content-quotes-07.html
2302
2303         * css/CSSParser.cpp:
2304         (WebCore::CSSParser::parseValue):
2305         Fix the parser to only accept none as a valid primitive identifier. Tested in 
2306         the newly added content-quotes-07.html.
2307
2308         * css/CSSPropertyNames.in:
2309         * css/StyleBuilderConverter.h:
2310         (WebCore::StyleBuilderConverter::convertQuotes):
2311         * css/StyleResolver.cpp:
2312         (WebCore::StyleResolver::applyProperty):
2313         Move "quotes" to the new style builder.
2314
2315         * rendering/style/RenderStyle.h:
2316         Add an initialQuotes() function for use in the auto-generated style builder.
2317
2318 2014-11-19  Dean Jackson  <dino@apple.com>
2319
2320         Handle unprefixed @keyframes rule
2321         https://bugs.webkit.org/show_bug.cgi?id=138899
2322         <rdar://problem/18943117>
2323
2324         Reviewed by Simon Fraser.
2325
2326         Support the parsing of unprefixed @keyframes. In
2327         CSSParser, assign the same token identifier to
2328         the prefixed and unprefixed forms. This will
2329         keep compatibility with older content. If a page
2330         has both forms, then whatever comes last will
2331         win (as it does if you had duplicate names of the same
2332         form).
2333
2334         Tests: animations/unprefixed-keyframes-rule.html
2335                animations/unprefixed-keyframes.html
2336
2337         * css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
2338         be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
2339         * css/CSSParser.cpp:
2340         (WebCore::CSSParser::detectAtToken): Look for the @keyframes style
2341         strings and assign the new token values.
2342
2343 2014-11-19  Andreas Kling  <akling@apple.com>
2344
2345         Move pseudo-style code from RenderObject to RenderElement.
2346         <https://webkit.org/b/138880>
2347
2348         Reviewed by Antti Koivisto.
2349
2350         Migrate get*PseudoStyle() to RenderElement, and the selection color
2351         functions along with them. This gets rid of a DOM ancestor walk in
2352         pseudo style lookup.
2353
2354         Narrow down some argument types to keep things building.
2355
2356         * rendering/RenderBlock.cpp:
2357         (WebCore::RenderBlock::logicalLeftSelectionGap):
2358         (WebCore::RenderBlock::logicalRightSelectionGap):
2359         (WebCore::styleForFirstLetter):
2360         (WebCore::RenderBlock::updateFirstLetterStyle):
2361         (WebCore::RenderBlock::createFirstLetterRenderer):
2362         * rendering/RenderBlock.h:
2363         * rendering/RenderElement.cpp:
2364         (WebCore::RenderElement::getCachedPseudoStyle):
2365         (WebCore::RenderElement::getUncachedPseudoStyle):
2366         (WebCore::RenderElement::selectionColor):
2367         (WebCore::RenderElement::selectionPseudoStyle):
2368         (WebCore::RenderElement::selectionForegroundColor):
2369         (WebCore::RenderElement::selectionEmphasisMarkColor):
2370         (WebCore::RenderElement::selectionBackgroundColor):
2371         * rendering/RenderElement.h:
2372         * rendering/RenderObject.cpp:
2373         (WebCore::RenderObject::selectionBackgroundColor): Deleted.
2374         (WebCore::RenderObject::selectionColor): Deleted.
2375         (WebCore::RenderObject::selectionPseudoStyle): Deleted.
2376         (WebCore::RenderObject::selectionForegroundColor): Deleted.
2377         (WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
2378         (WebCore::RenderObject::getCachedPseudoStyle): Deleted.
2379         (WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
2380         * rendering/RenderObject.h:
2381         * rendering/RenderText.h:
2382         (WebCore::RenderText::getCachedPseudoStyle):
2383         (WebCore::RenderText::selectionBackgroundColor):
2384         (WebCore::RenderText::selectionForegroundColor):
2385         (WebCore::RenderText::selectionEmphasisMarkColor):
2386         * rendering/svg/SVGInlineTextBox.cpp:
2387         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2388         (WebCore::SVGInlineTextBox::paint):
2389
2390 2014-11-19  Tim Horton  <timothy_horton@apple.com>
2391
2392         Add an optional entry transition (from selection highlight) to TextIndicator
2393         https://bugs.webkit.org/show_bug.cgi?id=138856
2394         <rdar://problem/18840128>
2395
2396         Reviewed by Anders Carlsson.
2397
2398         * WebCore.exp.in:
2399         Add an export.
2400
2401         * platform/spi/cocoa/QuartzCoreSPI.h:
2402         Add some SPI.
2403
2404 2014-11-19  Chris Dumez  <cdumez@apple.com>
2405
2406         Move 'outline-style' CSS property to the new StyleBuilder
2407         https://bugs.webkit.org/show_bug.cgi?id=138882
2408
2409         Reviewed by Sam Weinig.
2410
2411         Move 'outline-style' CSS property from DeprecatedStyleBuilder to the
2412         new StyleBuilder by using custom code.
2413
2414         No new tests, no behavior change.
2415
2416         * css/CSSPropertyNames.in:
2417         * css/DeprecatedStyleBuilder.cpp:
2418         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2419         (WebCore::ApplyPropertyDefault::setValue): Deleted.
2420         (WebCore::ApplyPropertyDefault::applyValue): Deleted.
2421         (WebCore::ApplyPropertyDefault::createHandler): Deleted.
2422         (WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted.
2423         (WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted.
2424         (WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted.
2425         (WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted.
2426         * css/StyleBuilderCustom.h:
2427         (WebCore::StyleBuilderFunctions::applyInheritOutlineStyle):
2428         (WebCore::StyleBuilderFunctions::applyInitialOutlineStyle):
2429         (WebCore::StyleBuilderFunctions::applyValueOutlineStyle):
2430
2431 2014-11-19  Joseph Pecoraro  <pecoraro@apple.com>
2432
2433         Web Inspector: JSContext inspection Resource search does not work
2434         https://bugs.webkit.org/show_bug.cgi?id=131252
2435
2436         Reviewed by Timothy Hatcher.
2437
2438         Test: inspector/debugger/search-scripts.html
2439
2440         * inspector/InspectorPageAgent.cpp:
2441         (WebCore::InspectorPageAgent::searchInResources):
2442         A little cleanup.
2443
2444 2014-11-19  Joseph Pecoraro  <pecoraro@apple.com>
2445
2446         Web Inspector: Provide $exception in the console for the thrown exception value
2447         https://bugs.webkit.org/show_bug.cgi?id=138726
2448
2449         Reviewed by Timothy Hatcher.
2450
2451         Tests: inspector/debugger/command-line-api-exception-nested-catch.html
2452                inspector/debugger/command-line-api-exception.html
2453
2454         * inspector/CommandLineAPIModuleSource.js:
2455         Expose $exception in the more complete command line API.
2456
2457 2014-11-19  David Hyatt  <hyatt@apple.com>
2458
2459         Images/replaced elements that are as tall as a page should be on their own page
2460         https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>
2461
2462         Reviewed by Dean Jackson.
2463
2464         Added fast/multicol/tall-image-behavior.html (and RL/LR variants)
2465
2466         * rendering/InlineFlowBox.cpp:
2467         (WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
2468         * rendering/InlineFlowBox.h:
2469         Add a new method that computes the line top and line bottom ignoring all margins,
2470         overflow and line-height. This allows us to see if a line that is taller than a page
2471         can be made to fit if we ignored margins and unused descent.
2472
2473         * rendering/RenderBlockFlow.cpp:
2474         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2475         Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
2476         to a new page if we see that we can fit on a page by ourselves without blank space
2477         included.
2478
2479 2014-11-18  Ada Chan  <adachan@apple.com>
2480
2481         Take Web Audio into account for the Page::isPlayingAudio() API.
2482         https://bugs.webkit.org/show_bug.cgi?id=137464
2483
2484         Reviewed by Jer Noble.
2485
2486         Make AudioContext a subclass of AudioProducer. It figures out whether there's
2487         audio playing by checking whether its AudioDestinationNode is playing (and not
2488         silent). It calls Document::updateIsPlayingAudio() whenever its audio playing
2489         state has changed.
2490
2491         Test: webaudio/web-audio-is-playing.html
2492
2493         * Modules/webaudio/AudioContext.cpp:
2494         (WebCore::AudioContext::lazyInitialize):
2495         Add itself to the Document's list of AudioProducers if it's not an offline
2496         audio context.
2497         (WebCore::AudioContext::uninitialize):
2498         Remove itself from the Document's list of AudioProducers if it's not an offline
2499         audio context.
2500         (WebCore::AudioContext::stop):
2501         Tell the document to update its audio playing state.
2502         (WebCore::AudioContext::isPlayingAudio):
2503         Return true if the audio context hasn't been stopped and its destination node is
2504         playing audio.
2505         (WebCore::AudioContext::pageMutedStateDidChange):
2506         Add a FIXME for now.
2507         (WebCore::AudioContext::isPlayingAudioDidChange):
2508         Call Document::updateIsPlayingAudio().
2509         * Modules/webaudio/AudioContext.h:
2510
2511         * Modules/webaudio/AudioDestinationNode.cpp:
2512         (WebCore::AudioDestinationNode::AudioDestinationNode):
2513         Initialize m_isSilent and m_isEffectivelyPlayingAudio.
2514         (WebCore::AudioDestinationNode::render):
2515         Call setIsSilent() with the appropriate value after rendering.
2516         (WebCore::AudioDestinationNode::isPlayingDidChange):
2517         Call updateIsEffectivelyPlayingAudio().
2518         (WebCore::AudioDestinationNode::setIsSilent):
2519         If m_isSilent has changed, call updateIsEffectivelyPlayingAudio().
2520         (WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
2521         If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange().
2522         * Modules/webaudio/AudioDestinationNode.h:
2523         (WebCore::AudioDestinationNode::isPlaying):
2524         (WebCore::AudioDestinationNode::isPlayingAudio):
2525
2526         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2527         (WebCore::DefaultAudioDestinationNode::isPlaying):
2528         Return whether the AudioDestination is playing.
2529         * Modules/webaudio/DefaultAudioDestinationNode.h:
2530
2531         * platform/audio/AudioIOCallback.h:
2532         * platform/audio/ios/AudioDestinationIOS.cpp:
2533         (WebCore::AudioDestinationIOS::start):
2534         Call setIsPlaying() instead.
2535         (WebCore::AudioDestinationIOS::stop):
2536         Ditto.
2537         (WebCore::AudioDestinationIOS::setIsPlaying):
2538         If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
2539         * platform/audio/ios/AudioDestinationIOS.h:
2540
2541         * platform/audio/mac/AudioDestinationMac.cpp:
2542         (WebCore::AudioDestinationMac::start):
2543         Call setIsPlaying() instead.
2544         (WebCore::AudioDestinationMac::stop):
2545         Ditto.
2546         (WebCore::AudioDestinationMac::setIsPlaying):
2547         If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
2548         * platform/audio/mac/AudioDestinationMac.h:
2549
2550         * testing/Internals.cpp:
2551         (WebCore::Internals::isPagePlayingAudio):
2552         * testing/Internals.h:
2553         * testing/Internals.idl:
2554         Add internals.isPagePlayingAudio() for testing.
2555
2556 2014-11-19  Daniel Bates  <dabates@apple.com>
2557
2558         Attempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit.org/changeset/176347>
2559         (https://bugs.webkit.org/show_bug.cgi?id=136863)
2560
2561         Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite.
2562
2563         * platform/spi/cf/CFNetworkSPI.h:
2564
2565 2014-11-19  Antti Koivisto  <antti@apple.com>
2566
2567         Fix TilesAdded bitmask
2568         https://bugs.webkit.org/show_bug.cgi?id=138883
2569
2570         Reviewed by Simon Fraser.
2571
2572         Simon spotted this.
2573
2574         * platform/graphics/ca/GraphicsLayerCA.h:
2575
2576             Use 1LLU << 29 instead of 1LLU < 29
2577             This worked before by pure luck as bit 0 is unused.
2578
2579 2014-11-19  Daniel Bates  <dabates@apple.com>
2580
2581         [iOS] Make WebKit build with public iOS SDK
2582         https://bugs.webkit.org/show_bug.cgi?id=136863
2583
2584         Reviewed by David Kilzer.
2585
2586         * WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and
2587         NS{CalendarDate, String, URLDownload}SPI.h.
2588         * loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of
2589         CFNetwork data types and functions from here to file CFNetworkSPI.h and
2590         include header CFNetworkSPI.h.
2591         * platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for
2592         CFURLRequestSPI.h as the content of the latter was incorporated into the former.
2593         * platform/spi/cf/CFNetworkSPI.h: Added.
2594         * platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality
2595         into CFNetworkSPI.h
2596         * platform/spi/cocoa/NSCalendarDateSPI.h: Added.
2597         * platform/spi/cocoa/NSStringSPI.h: Added.
2598         * platform/spi/cocoa/NSURLDownloadSPI.h: Added.
2599
2600 2014-11-19  Benjamin Poulain  <bpoulain@apple.com>
2601
2602         Get rid of AccessibilityObject::setRoleValue()
2603         https://bugs.webkit.org/show_bug.cgi?id=138861
2604
2605         Reviewed by Chris Fleizach.
2606
2607         * accessibility/AccessibilityObject.h:
2608         (WebCore::AccessibilityObject::setRoleValue): Deleted.
2609
2610 2014-11-19  Philippe Normand  <pnormand@igalia.com>
2611
2612         Missing NULL-check in VideoTrack::setLanguage
2613         https://bugs.webkit.org/show_bug.cgi?id=138867
2614
2615         Reviewed by Jer Noble.
2616
2617         * html/track/VideoTrack.cpp:
2618         (WebCore::VideoTrack::setLanguage): Prevent change event creation
2619         on an empty video track list.
2620
2621 2014-11-19  Chris Fleizach  <cfleizach@apple.com>
2622
2623         AX: Safari fails to load a web page with VoiceOver
2624         https://bugs.webkit.org/show_bug.cgi?id=138849
2625
2626         Reviewed by Mario Sanchez Prada.
2627
2628         Sometimes an inlineElementContinuation will continue to an inline RenderBlock, so we case this incorrectly and bad things happen.
2629
2630         Test: accessibility/inline-block-assertion.html
2631
2632         * accessibility/AccessibilityRenderObject.cpp:
2633         (WebCore::startOfContinuations):
2634
2635 2014-11-19  Zalan Bujtas  <zalan@apple.com>
2636
2637         Simple line layout: RenderTreeAsText should use rangeForRenderer() when dumping simple line text.
2638         https://bugs.webkit.org/show_bug.cgi?id=138847
2639
2640         Reviewed by Antti Koivisto.
2641
2642         This is in preparation to support multiple renderers for simple line layout.
2643         Use rangeForRenderer() to get runs for a particular renderer as opposed to for the entire flow.
2644
2645         Not testable.
2646
2647         * rendering/RenderTreeAsText.cpp:
2648         (WebCore::write):
2649
2650 2014-11-19  peavo@outlook.com  <peavo@outlook.com>
2651
2652         [WinCairo] Compile error when CSS_SELECTORS_LEVEL4 is not enabled.
2653         https://bugs.webkit.org/show_bug.cgi?id=138870
2654
2655         Reviewed by Alex Christensen.
2656
2657         * css/CSSSelector.cpp:
2658         (WebCore::simpleSelectorSpecificityInternal):
2659
2660 2014-11-19  Chris Fleizach  <cfleizach@apple.com>
2661
2662         AX: Screen braille input doesn't work on forms.
2663         https://bugs.webkit.org/show_bug.cgi?id=138804
2664
2665         Reviewed by Mario Sanchez Prada.
2666
2667         Allow iOS to set values of text fields through the API.
2668
2669         Test: platform/ios-sim/accessibility/set-value.html
2670
2671         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2672         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:]):
2673
2674 2014-11-19  Zalan Bujtas  <zalan@apple.com>
2675
2676         Simple line layout: Add renderer based rect collecting to RunResolver.
2677         https://bugs.webkit.org/show_bug.cgi?id=138818
2678
2679         Reviewed by Antti Koivisto.
2680
2681         This is in preparation to multiple renderers support.
2682         RunResolver should be able to collect rects for a particular renderer
2683         that might overlap multiple runs. (or might just be a subset of a Run)
2684
2685         Covered by existing tests.
2686
2687         * rendering/SimpleLineLayoutFlowContents.cpp:
2688         (WebCore::SimpleLineLayout::FlowContents::renderer): It operates on a single renderer currently.
2689         (WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions): It operates on a single renderer currently.
2690         * rendering/SimpleLineLayoutFlowContents.h:
2691         * rendering/SimpleLineLayoutFunctions.cpp:
2692         (WebCore::SimpleLineLayout::computeTextBoundingBox):
2693         (WebCore::SimpleLineLayout::computeTextFirstRunLocation):
2694         (WebCore::SimpleLineLayout::collectTextAbsoluteRects):
2695         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
2696         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
2697         * rendering/SimpleLineLayoutResolver.cpp:
2698         (WebCore::SimpleLineLayout::baselinePosition):
2699         (WebCore::SimpleLineLayout::linePosition):
2700         (WebCore::SimpleLineLayout::lineSize):
2701         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
2702         (WebCore::SimpleLineLayout::RunResolver::Run::rectForTextRenderer):
2703         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
2704         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2705         (WebCore::SimpleLineLayout::RunResolver::Run::computeRect):
2706         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
2707         * rendering/SimpleLineLayoutResolver.h:
2708
2709 2014-11-19  Dhi Aurrahman  <diorahman@rockybars.com>
2710
2711         Add selector checker for :lang pseudo class in Selectors level 4
2712         https://bugs.webkit.org/show_bug.cgi?id=138281
2713
2714         Reviewed by Benjamin Poulain.
2715
2716         Add selector checker for :lang pseudo class in Selectors level 4.
2717
2718         The language tags matching is specified in [1,2].
2719
2720         [1] http://www.ietf.org/rfc/rfc4647.txt
2721         [2] http://dev.w3.org/csswg/selectors4/#the-lang-pseudo
2722
2723         Tests: fast/selectors/lang-extended-filtering.html
2724                fast/selectors/lang-multiple.html
2725
2726         * css/SelectorChecker.cpp:
2727         (WebCore::SelectorChecker::checkOne):
2728         * css/SelectorCheckerTestFunctions.h:
2729         (WebCore::containslanguageSubtagMatchingRange):
2730         (WebCore::matchesLangPseudoClass):
2731         (WebCore::matchesLangPseudoClassDeprecated):
2732         * cssjit/SelectorCompiler.cpp:
2733         (WebCore::SelectorCompiler::addPseudoClassType):
2734
2735 2014-11-18  Philippe Normand  <pnormand@igalia.com>
2736
2737         start/stop method for AudioBufferSourceNodes and OscillatorNodes can take no args
2738         https://bugs.webkit.org/show_bug.cgi?id=138739
2739
2740         Reviewed by Darin Adler.
2741
2742         The patch is inspired by the following Blink revision by
2743         <rtoy@google.com>:
2744         <https://src.chromium.org/viewvc/blink?view=rev&revision=160845>
2745
2746         Test: webaudio/dom-exceptions.html
2747
2748         * Modules/webaudio/AudioBufferSourceNode.cpp:
2749         (WebCore::AudioBufferSourceNode::start):
2750         (WebCore::AudioBufferSourceNode::startPlaying):
2751         (WebCore::AudioBufferSourceNode::noteGrainOn):
2752         (WebCore::AudioBufferSourceNode::startGrain): Deleted.
2753         * Modules/webaudio/AudioBufferSourceNode.h:
2754         * Modules/webaudio/AudioBufferSourceNode.idl:
2755         * Modules/webaudio/AudioScheduledSourceNode.cpp:
2756         (WebCore::AudioScheduledSourceNode::start):
2757         (WebCore::AudioScheduledSourceNode::stop):
2758         * Modules/webaudio/AudioScheduledSourceNode.h:
2759         * Modules/webaudio/OscillatorNode.idl:
2760
2761 2014-11-18  Benjamin Poulain  <benjamin@webkit.org>
2762
2763         Add the initial implementation of dynamic specificity for :matches()
2764         https://bugs.webkit.org/show_bug.cgi?id=138822
2765
2766         Reviewed by Andreas Kling.
2767
2768         Previously we completely ignored the selector list of :matches() when computing
2769         the specificity of the selector.
2770
2771         The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
2772         "The specificity of a :matches() pseudo-class, however, is the specificity
2773          of the most specific complex selector that matched the given element."
2774
2775         This patch does just that.
2776
2777         In the CSS JIT, we only consider specificities that can be computed statically
2778         for now, this should be extended later.
2779         When the specificity is dynamic, we fall back to SelectorChecker. In that case,
2780         we execute every selector of the selector list and we keep the maximum value
2781         as the specificity for the whole :matches().
2782
2783         Tests: fast/css/matches-specificity-1.html
2784                fast/css/matches-specificity-2.html
2785                fast/css/matches-specificity-3.html
2786                fast/css/matches-specificity-4.html
2787                fast/css/matches-specificity-5.html
2788                fast/css/matches-specificity-6.html
2789                fast/css/matches-specificity-7.html
2790                fast/css/matches-specificity-8.html
2791                fast/css/matches-specificity-9.html
2792                fast/css/matches-specificity-10.html
2793
2794         * css/CSSSelector.cpp:
2795         (WebCore::selectorSpecificity):
2796         (WebCore::maxSpecificity):
2797         (WebCore::CSSSelector::specificity):
2798         (WebCore::simpleSelectorSpecificityInternal):
2799         (WebCore::CSSSelector::simpleSelectorSpecificity):
2800         :matches() itself should not have any specificity. The specificity of its components
2801         is computed in SelectorChecker.
2802
2803         Since :matches() is no longer accounted as a class B specificity, I had to finish
2804         the specificity of :not() or some test breaks.
2805
2806         * css/CSSSelector.h:
2807         * css/PageRuleCollector.cpp:
2808         (WebCore::comparePageRules):
2809         * css/SelectorChecker.cpp:
2810         (WebCore::SelectorChecker::checkOne):
2811         We can no longer shortcut the execution when context.pseudoElementEffective is false.
2812         There is no guarantee that a following selector wouldn't match with a higher specificity.
2813
2814         * cssjit/SelectorCompiler.cpp:
2815         (WebCore::SelectorCompiler::addPseudoClassType):
2816         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2817         (WebCore::SelectorCompiler::constructFragments):
2818         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2819
2820 2014-11-18  David Kilzer  <ddkilzer@apple.com>
2821
2822         FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
2823         <http://webkit.org/b/138813>
2824
2825         Reviewed by Mark Rowe.
2826
2827         * Configurations/FeatureDefines.xcconfig: Switch to using SDK
2828         selectors.
2829
2830 2014-11-18  Chris Dumez  <cdumez@apple.com>
2831
2832         Crash when setting 'z-index' / 'flex-shrink' CSS properties to a calculated value
2833         https://bugs.webkit.org/show_bug.cgi?id=138783
2834
2835         Reviewed by Andreas Kling.
2836
2837         Update operators converting CSSPrimitiveValue to integer / floating
2838         point types to properly handle calculated values (e.g. 'calc(2 * 3)').
2839         Previously, this was not working in release builds and we would hit an
2840         ASSERT_NOT_REACHED() in debug builds.
2841
2842         Tests: fast/css/flex-shrink-calculated-value.html
2843                fast/css/z-index-calculated-value.html
2844
2845         * css/CSSPrimitiveValueMappings.h:
2846         (WebCore::CSSPrimitiveValue::operator unsigned short):
2847         (WebCore::CSSPrimitiveValue::operator int):
2848         (WebCore::CSSPrimitiveValue::operator unsigned):
2849         (WebCore::CSSPrimitiveValue::operator float):
2850
2851 2014-11-18  Commit Queue  <commit-queue@webkit.org>
2852
2853         Unreviewed, rolling out r176263 and r176273.
2854         https://bugs.webkit.org/show_bug.cgi?id=138854
2855
2856         Underlines are hideous. (Requested by litherum on #webkit).
2857
2858         Reverted changesets:
2859
2860         "Use underlining metrics from the font file"
2861         https://bugs.webkit.org/show_bug.cgi?id=138762
2862         http://trac.webkit.org/changeset/176263
2863
2864         "iOS build fix."
2865         http://trac.webkit.org/changeset/176273
2866
2867 2014-11-18  Chris Dumez  <cdumez@apple.com>
2868
2869         Add a setting to toggle DOMTimer throttling support
2870         https://bugs.webkit.org/show_bug.cgi?id=138844
2871         <rdar://problem/19020874>
2872
2873         Reviewed by Andreas Kling.
2874
2875         Add a setting to disable DOM timers throttling, in order to help
2876         developers determine if a specific issue is caused by timer
2877         throttling.
2878
2879         * page/DOMTimer.cpp:
2880         (WebCore::DOMTimerFireState::contextDocument):
2881         (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges):
2882         (WebCore::DOMTimer::isDOMTimersThrottlingEnabled):
2883         (WebCore::DOMTimer::updateThrottlingStateIfNecessary):
2884         * page/DOMTimer.h:
2885         * page/Settings.in:
2886
2887 2014-11-18  Beth Dakin  <bdakin@apple.com>
2888
2889         REGRESSION: Invoking dictionary lookup on text in some search fields searches for 
2890         incorrect item
2891         https://bugs.webkit.org/show_bug.cgi?id=138853
2892         -and corresponding-
2893         rdar://problem/18912505
2894
2895         Reviewed by Tim Horton.
2896
2897         Get the visible position based on the frame, not just the renderer.
2898         * editing/mac/DictionaryLookup.mm:
2899         (WebCore::rangeForDictionaryLookupAtHitTestResult):
2900
2901 2014-11-18  David Hyatt  <hyatt@apple.com>
2902
2903         REGRESSION (r167210): Invalid cast in WebCore::RenderBlock::blockSelectionGaps
2904         https://bugs.webkit.org/show_bug.cgi?id=137590
2905
2906         Reviewed by Dean Jackson.
2907
2908         Added fast/block/selection-block-gaps-crash.html
2909
2910         * rendering/RenderBlock.cpp:
2911         (WebCore::RenderBlock::blockSelectionGaps):
2912         Check that we really are a RenderBlock before recurring.
2913
2914 2014-11-18  Andreas Kling  <akling@apple.com>
2915
2916         Avoid synchronous style recalc in Document.activeElement
2917         <https://webkit.org/b/138850>
2918
2919         Reviewed by Ryosuke Niwa.
2920
2921         This subtly changes the behavior of <input autofocus>, which was caught by
2922         a layout test. Auto-focus doesn't happen until the render tree is attached,
2923         although it was possible to force it by accessing document.activeElement.
2924
2925         Now auto-focus is always lazy. This is consistent with other browser engines.
2926
2927         ~1% progression on Speedometer locally.
2928
2929         * dom/Document.cpp:
2930         (WebCore::Document::activeElement):
2931
2932 2014-11-18  Chris Dumez  <cdumez@apple.com>
2933
2934         Have Vector::capacity() return an unsigned instead of a size_t
2935         https://bugs.webkit.org/show_bug.cgi?id=138842
2936
2937         Reviewed by Andreas Kling.
2938
2939         Update the code base now that Vector::capacity() returns an unsigned
2940         type instead of a size_t.
2941
2942         No new tests, no behavior change.
2943
2944         * editing/TextIterator.cpp:
2945         (WebCore::SearchBuffer::append):
2946         (WebCore::SearchBuffer::prependContext):
2947         (WebCore::SearchBuffer::search):
2948         (WebCore::SearchBuffer::length):
2949         * platform/SharedBuffer.cpp:
2950         (WebCore::SharedBuffer::duplicateDataBufferIfNecessary):
2951
2952 2014-11-18  Geoffrey Garen  <ggaren@apple.com>
2953
2954         Removed the custom allocator for ListHashSet nodes
2955         https://bugs.webkit.org/show_bug.cgi?id=138841
2956
2957         Reviewed by Andreas Kling.
2958
2959         Uses of ListHashSet no longer need to declare an inline capacity,
2960         since that was only used to specify the capacity of the custom allocator.
2961
2962         * dom/DOMNamedFlowCollection.h:
2963         * dom/DocumentEventQueue.h:
2964         * dom/DocumentStyleSheetCollection.h:
2965         * dom/NamedFlowCollection.h:
2966         * html/FormController.h:
2967         * rendering/FloatingObjects.h:
2968         * rendering/RenderBlock.h:
2969
2970 2014-11-18  David Hyatt  <hyatt@apple.com>
2971
2972         REGRESSION(r152313): Inline-block element doesn't wrap properly
2973         https://bugs.webkit.org/show_bug.cgi?id=138846 - <rdar://problem/18838703>
2974
2975         Reviewed by Simon Fraser.
2976
2977         Added fast/inline-block/inline-block-empty-spans.html
2978
2979         * rendering/line/BreakingContextInlineHeaders.h:
2980         (WebCore::BreakingContext::canBreakAtThisPosition):
2981
2982 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
2983
2984         Multicolumn layout with negative line spacing and orphans causes pieces of letters to be shown at the bottom of columns
2985         https://bugs.webkit.org/show_bug.cgi?id=138204
2986
2987         Reviewed by Dave Hyatt.
2988
2989         This code is responsible for pushing block elements to the next column if
2990         the "orphans" CSS property is triggered. The mechanism by which this is
2991         achieved is to push the block down such that the origin of the block is
2992         at the origin of the next column. However, if there is negative line
2993         spacing, the top portion of the text might actually be on top of the
2994         origin of the block. Therefore, the block wasn't being pushed down enough
2995         to entirely contain its text, so the top pieces were being drawn on the
2996         previous column.
2997
2998         Test: fast/multicol/orphans-negative-line-spacing.html
2999
3000         * rendering/RenderBlockFlow.cpp:
3001         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
3002
3003 2014-11-18  Chris Dumez  <cdumez@apple.com>
3004
3005         DOMTimers sometimes don't get unthrottled on scrolling
3006         https://bugs.webkit.org/show_bug.cgi?id=138838
3007
3008         Reviewed by Antti Koivisto.
3009
3010         DOMTimers sometimes didn't get unthrottled on scrolling. This is
3011         because we stopped listening for viewport changes every time the
3012         timer fires, but we didn't listen for those changes again if we
3013         decided the timer should stay throttled after the timer's action
3014         was executed.
3015
3016         We should listen for viewport changes again after executing the
3017         timer's action, if there are elements outside the viewport causing
3018         the DOMTimer to be throttled, even if the throttleState hasn't
3019         changed (i.e the timer stays throttled).
3020
3021         Test: fast/dom/timer-unthrottle-on-scroll.html
3022
3023         * page/DOMTimer.cpp:
3024         (WebCore::DOMTimer::updateThrottlingStateIfNecessary):
3025         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3026         (WebCore::DOMTimer::updateThrottlingStateAfterViewportChange):
3027
3028 2014-11-18  Daniel Bates  <dbates@webkit.org>
3029
3030         [iOS] Make WebCore build and link with public SDK
3031         https://bugs.webkit.org/show_bug.cgi?id=136487
3032
3033         Reviewed by David Kilzer.
3034
3035         * bindings/objc/DOMInternal.mm: Include header NSMapTableSPI.h.
3036         * bindings/objc/WebScriptObject.mm: Ditto; Also fix style nit, substitute
3037         #import for #include when importing header WTFString.h.
3038         * bridge/objc/objc_instance.mm: Include header NSMapTableSPI.h and remove
3039         #import NSMapTable.h as the former will import the latter.
3040         * platform/ios/PlatformEventFactoryIOS.mm: Include header wtf/CurrentTime.h
3041         for the declaration of WTF::currentTime().
3042         * platform/ios/wak/WebCoreThread.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.
3043         * platform/spi/ios/AVKitSPI.h: Add more SPI.
3044         * platform/spi/ios/MPAVRoutingControllerSPI.h: Ditto.
3045
3046 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
3047
3048         Subclass CachedFont for SVG fonts
3049         https://bugs.webkit.org/show_bug.cgi?id=138686
3050
3051         Reviewed by Simon Fraser.
3052
3053         Re-landing due to flakey bots.
3054
3055         CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
3056         Splitting out this SVG-specific code into a subclass of CachedFont
3057         cleans up the design.
3058
3059         No new tests because there is no behavior change.
3060
3061         * CMakeLists.txt:
3062         * WebCore.vcxproj/WebCore.vcxproj:
3063         * WebCore.vcxproj/WebCore.vcxproj.filters:
3064         * WebCore.xcodeproj/project.pbxproj:
3065         * css/CSSFontFaceSource.cpp:
3066         (WebCore::CSSFontFaceSource::getFontData): There are two sections
3067         in this function; one for SVG fonts and one for regular fonts.
3068         I've moved these two sections into CachedFont and SVGCachedFont,
3069         thereby simplifying this function.
3070         (WebCore::CSSFontFaceSource::ensureFontData): Ditto.
3071         (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
3072         (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
3073         (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
3074         * css/CSSFontFaceSource.h: Put functions that are simple enough to
3075         be inlined here.
3076         * css/CSSFontFaceSrcValue.cpp:
3077         (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
3078         function.
3079         (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
3080         from CSSFontSelector to CachedResourceHandle regarding if we should
3081         be using SVGCachedFont instead of CachedFont.
3082         * css/CSSFontFaceSrcValue.h: New convenience function.
3083         * css/CSSFontSelector.cpp:
3084         (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
3085         * inspector/InspectorPageAgent.cpp:
3086         (WebCore::InspectorPageAgent::cachedResourceType): Update for new
3087         CachedResource type
3088         (WebCore::cachedResourcesForFrame): Ditto.
3089         * loader/cache/CachedFont.cpp:
3090         (WebCore::CachedFont::CachedFont):
3091         (WebCore::CachedFont::ensureCustomFontData): Taken from
3092         CSSFontFaceSource::getFontData()
3093         (WebCore::CachedFont::getFontData): Ditto.
3094         (WebCore::CachedFont::platformDataFromCustomData): Ditto.
3095         (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
3096         (WebCore::CachedFont::getSVGFontById): Ditto.
3097         * loader/cache/CachedFont.h:
3098         * loader/cache/CachedResource.cpp:
3099         (WebCore::defaultPriorityForResourceType): Update for new enum
3100         type.
3101         * loader/cache/CachedResource.h:
3102         * loader/cache/CachedResourceLoader.cpp:
3103         (WebCore::createResource): Takes new boolean.
3104         (WebCore::CachedResourceLoader::requestFont): Ditto.
3105         (WebCore::CachedResourceLoader::checkInsecureContent): Update for
3106         new enum type
3107         (WebCore::CachedResourceLoader::canRequest): Ditto.
3108         * loader/cache/CachedResourceLoader.h:
3109         * loader/cache/CachedSVGFont.cpp: Added.
3110         (WebCore::CachedSVGFont::CachedSVGFont): Moved from
3111         CSSFontFaceSource::getFontData() and CachedFont
3112         (WebCore::CachedSVGFont::getFontData): Ditto.
3113         (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
3114         (WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
3115         (WebCore::CachedSVGFont::getSVGFontById): Ditto.
3116         (WebCore::CachedSVGFont::firstFontFace): Ditto.
3117         * loader/cache/CachedSVGFont.h: Subclass CachedFont.
3118         * loader/cache/MemoryCache.cpp:
3119         (WebCore::MemoryCache::getStatistics): Update for new enum.
3120         * svg/SVGFontFaceUriElement.cpp:
3121         (WebCore::isSVGFontTarget): Convenience function.
3122         (WebCore::SVGFontFaceUriElement::loadFont): Update for new
3123         boolean.
3124
3125 2014-11-18  Chris Dumez  <cdumez@apple.com>
3126
3127         Update the Vector API to deal with unsigned types instead of size_t
3128         https://bugs.webkit.org/show_bug.cgi?id=138824
3129
3130         Reviewed by Andreas Kling.
3131
3132         Update code base to fix build errors related to the typing changes
3133         in the Vector API (size_t -> unsigned).
3134
3135         No new tests, no behavior change.
3136
3137         * WebCore.exp.in:
3138         * bindings/js/JSDOMBinding.h:
3139         (WebCore::jsArray):
3140         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3141         * cssjit/SelectorCompiler.cpp:
3142         * html/HTMLFormElement.cpp:
3143         (WebCore::removeFromVector):
3144         * html/parser/HTMLParserIdioms.h:
3145         * html/parser/XSSAuditor.cpp:
3146
3147 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
3148
3149         Unreviewed iOS build fix
3150
3151         * platform/graphics/ios/SimpleFontDataIOS.mm:
3152         (WebCore::SimpleFontData::platformInit):
3153
3154 2014-11-18  Dan Bernstein  <mitz@apple.com>
3155
3156         iOS build fix.
3157
3158         * platform/graphics/ios/SimpleFontDataIOS.mm:
3159         (WebCore::SimpleFontData::platformInit):
3160
3161 2014-11-18  Commit Queue  <commit-queue@webkit.org>
3162
3163         Unreviewed, rolling out r176264.
3164         https://bugs.webkit.org/show_bug.cgi?id=138837
3165
3166         caused many test failures (Requested by litherum on #webkit).
3167
3168         Reverted changeset:
3169
3170         "Subclass CachedFont for SVG fonts"
3171         https://bugs.webkit.org/show_bug.cgi?id=138686
3172         http://trac.webkit.org/changeset/176264
3173
3174 2014-11-18  Daniel Bates  <dabates@apple.com>
3175
3176         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
3177         SPI are not available in public SDK
3178         https://bugs.webkit.org/show_bug.cgi?id=138802
3179
3180         Reviewed by David Kilzer.
3181
3182         Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
3183         that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
3184         and use these headers instead of the including private headers corresponding to these libraries/frameworks.
3185
3186         * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
3187         MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
3188         DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
3189         * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
3190         * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
3191         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
3192         for private header IOKit/pwr_mgt/IOPMLib.h.
3193         * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
3194         for private header dispatch/private.h.
3195         * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
3196         for private header mach-o/dyld_priv.h.
3197         * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
3198         private header MobileGestalt.h.
3199         * platform/spi/cocoa/DispatchSPI.h: Added.
3200         * platform/spi/cocoa/DynamicLinkerSPI.h: Added.
3201         * platform/spi/cocoa/IOPMLibSPI.h: Added.
3202         * platform/spi/cocoa/MachVMSPI.h: Added.
3203         * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
3204         * platform/spi/ios/MobileGestaltSPI.h: Added.
3205
3206 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
3207
3208         Subclass CachedFont for SVG fonts
3209         https://bugs.webkit.org/show_bug.cgi?id=138686
3210
3211         Reviewed by Simon Fraser.
3212
3213         CachedFont had many #if ENABLE(SVG_FONTS) scattered throughout it.
3214         Splitting out this SVG-specific code into a subclass of CachedFont
3215         cleans up the design.
3216
3217         No new tests because there is no behavior change.
3218
3219         * CMakeLists.txt:
3220         * WebCore.vcxproj/WebCore.vcxproj:
3221         * WebCore.vcxproj/WebCore.vcxproj.filters:
3222         * WebCore.xcodeproj/project.pbxproj:
3223         * css/CSSFontFaceSource.cpp:
3224         (WebCore::CSSFontFaceSource::getFontData): There are two sections
3225         in this function; one for SVG fonts and one for regular fonts.
3226         I've moved these two sections into CachedFont and SVGCachedFont,
3227         thereby simplifying this function.
3228         (WebCore::CSSFontFaceSource::ensureFontData): Ditto.
3229         (WebCore::CSSFontFaceSource::svgFontFaceElement): Moved to header.
3230         (WebCore::CSSFontFaceSource::setSVGFontFaceElement): Ditto.
3231         (WebCore::CSSFontFaceSource::isSVGFontFaceSource): Ditto.
3232         * css/CSSFontFaceSource.h: Put functions that are simple enough to
3233         be inlined here.
3234         * css/CSSFontFaceSrcValue.cpp:
3235         (WebCore::CSSFontFaceSrcValue::isSVGFontTarget): Convenience
3236         function.
3237         (WebCore::CSSFontFaceSrcValue::cachedFont): Pass through a boolean
3238         from CSSFontSelector to CachedResourceHandle regarding if we should
3239         be using SVGCachedFont instead of CachedFont.
3240         * css/CSSFontFaceSrcValue.h: New convenience function.
3241         * css/CSSFontSelector.cpp:
3242         (WebCore::CSSFontSelector::addFontFaceRule): Pass through a boolean
3243         * inspector/InspectorPageAgent.cpp:
3244         (WebCore::InspectorPageAgent::cachedResourceType): Update for new
3245         CachedResource type
3246         (WebCore::cachedResourcesForFrame): Ditto.
3247         * loader/cache/CachedFont.cpp:
3248         (WebCore::CachedFont::CachedFont):
3249         (WebCore::CachedFont::ensureCustomFontData): Taken from
3250         CSSFontFaceSource::getFontData()
3251         (WebCore::CachedFont::getFontData): Ditto.
3252         (WebCore::CachedFont::platformDataFromCustomData): Ditto.
3253         (WebCore::CachedFont::ensureSVGFontData): Moved to SVGCachedFont.
3254         (WebCore::CachedFont::getSVGFontById): Ditto.
3255         * loader/cache/CachedFont.h:
3256         * loader/cache/CachedResource.cpp:
3257         (WebCore::defaultPriorityForResourceType): Update for new enum
3258         type.
3259         * loader/cache/CachedResource.h:
3260         * loader/cache/CachedResourceLoader.cpp:
3261         (WebCore::createResource): Takes new boolean.
3262         (WebCore::CachedResourceLoader::requestFont): Ditto.
3263         (WebCore::CachedResourceLoader::checkInsecureContent): Update for
3264         new enum type
3265         (WebCore::CachedResourceLoader::canRequest): Ditto.
3266         * loader/cache/CachedResourceLoader.h:
3267         * loader/cache/CachedSVGFont.cpp: Added.
3268         (WebCore::CachedSVGFont::CachedSVGFont): Moved from
3269         CSSFontFaceSource::getFontData() and CachedFont
3270         (WebCore::CachedSVGFont::getFontData): Ditto.
3271         (WebCore::CachedSVGFont::platformDataFromCustomData): Ditto.
3272         (WebCore::CachedSVGFont::ensureCustomFontData): Ditto.
3273         (WebCore::CachedSVGFont::getSVGFontById): Ditto.
3274         (WebCore::CachedSVGFont::firstFontFace): Ditto.
3275         * loader/cache/CachedSVGFont.h: Subclass CachedFont.
3276         * loader/cache/MemoryCache.cpp:
3277         (WebCore::MemoryCache::getStatistics): Update for new enum.
3278         * svg/SVGFontFaceUriElement.cpp:
3279         (WebCore::isSVGFontTarget): Convenience function.
3280         (WebCore::SVGFontFaceUriElement::loadFont): Update for new
3281         boolean.
3282
3283 2014-11-18  Myles C. Maxfield  <litherum@gmail.com>
3284
3285         Use underlining metrics from the font file
3286         https://bugs.webkit.org/show_bug.cgi?id=138762
3287
3288         Reviewed by Dave Hyatt.
3289
3290         Test: platform/mac/fast/css3-text/css3-text-decoration/text-decoration-thickness.html
3291
3292         * platform/graphics/FontMetrics.h: Adding variables for text decoration thickness and
3293         underline position.
3294         (WebCore::FontMetrics::FontMetrics):
3295         (WebCore::FontMetrics::decorationThickness):
3296         (WebCore::FontMetrics::setDecorationThickness):
3297         (WebCore::FontMetrics::underlinePosition):
3298         (WebCore::FontMetrics::setUnderlinePosition):
3299         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
3300         (WebCore::SimpleFontData::platformInit): Initialize new FontMetrics members.
3301         * platform/graphics/ios/SimpleFontDataIOS.mm:
3302         (WebCore::SimpleFontData::platformInit): Ditto.
3303         * platform/graphics/mac/SimpleFontDataMac.mm:
3304         (WebCore::SimpleFontData::platformInit): Ditto.
3305         * platform/graphics/win/SimpleFontDataCGWin.cpp:
3306         (WebCore::SimpleFontData::platformInit): Ditto.
3307         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3308         (WebCore::SimpleFontData::platformInit): Ditto.
3309         * platform/graphics/win/SimpleFontDataWin.cpp:
3310         (WebCore::SimpleFontData::initGDIFont): Ditto.
3311         * rendering/InlineTextBox.cpp:
3312         (WebCore::InlineTextBox::paintDecoration): Use FontMetrics data.
3313         * style/InlineTextBoxStyle.cpp:
3314         (WebCore::computeUnderlineOffset): Ditto.
3315         (WebCore::visualOverflowForDecorations): Ditto.
3316         * style/InlineTextBoxStyle.h:
3317         (WebCore::textDecorationStrokeThickness): Deleted.
3318         * svg/SVGFontData.cpp:
3319         (WebCore::SVGFontData::initializeFontData): Initialize new FontMetrics members.
3320
3321 2014-11-17  David Hyatt  <hyatt@apple.com>
3322
3323         Improve Ruby selection (getting rid of overlap and improving gap filling)
3324         https://bugs.webkit.org/show_bug.cgi?id=138250
3325
3326         Reviewed by Dean Jackson.
3327
3328         * rendering/RenderBlock.cpp:
3329         (WebCore::RenderBlock::selectionGaps):
3330         (WebCore::RenderBlock::blockSelectionGaps):
3331         Add Ruby text in along with the Ruby base.
3332
3333         * rendering/RenderBlockFlow.cpp:
3334         (WebCore::RenderBlockFlow::inlineSelectionGaps):
3335         Don't let block gaps get filled in here.
3336
3337         * rendering/RenderRubyBase.h:
3338         Expose accessor to the ruby run.
3339
3340         * rendering/RenderRubyText.cpp:
3341         (WebCore::RenderRubyText::rubyRun):
3342         * rendering/RenderRubyText.h:
3343         Add accessor to the ruby run.
3344
3345         * rendering/RootInlineBox.cpp:
3346         (WebCore::RootInlineBox::selectionTop):
3347         (WebCore::RootInlineBox::selectionBottom):
3348         Improve selectionTop and selectionBottom of ruby bases to avoid the
3349         ruby text. Improve the selectionTop and selectionBottom of ruby texts
3350         to fill the gap up to the previous/next line as appropriate.
3351
3352 2014-11-18  Shivakumar JM  <shiva.jm@samsung.com>
3353
3354         crypto: Use sequence<> instead of KeyUsage[] in IDL.
3355         https://bugs.webkit.org/show_bug.cgi?id=138823
3356
3357         Reviewed by Darin Adler.
3358
3359         Use sequence<KeyUsage> instead of KeyUsage[] in crypto IDL as per spec: https://dvcs.w3.org/hg/webcrypto-api/raw-file/tip/spec/
3360         Overview.html#SubtleCrypto-method-generateKey
3361
3362         No new tests, no behavior change.
3363
3364         * crypto/SubtleCrypto.idl:
3365
3366 2014-11-18  Philippe Normand  <pnormand@igalia.com>
3367
3368         HRTFDatabaseLoader is not an absolute condition to run audioContext
3369         https://bugs.webkit.org/show_bug.cgi?id=138829
3370
3371         Reviewed by Jer Noble.
3372
3373         This patch is a port of the following Blink revision by
3374         <keonho07.kim@samsung.com>:
3375         <https://src.chromium.org/viewvc/blink?revision=167887&view=revision>
3376
3377         * Modules/webaudio/AudioContext.cpp:
3378         (WebCore::AudioContext::AudioContext):
3379         (WebCore::AudioContext::isRunnable): Deleted.
3380         * Modules/webaudio/AudioContext.h:
3381         (WebCore::AudioContext::hrtfDatabaseLoader): Deleted.
3382         * Modules/webaudio/AudioDestinationNode.cpp:
3383         (WebCore::AudioDestinationNode::render):
3384         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
3385         (WebCore::OfflineAudioDestinationNode::offlineRender):
3386         * Modules/webaudio/PannerNode.cpp:
3387         (WebCore::PannerNode::PannerNode):
3388         (WebCore::PannerNode::process):
3389         (WebCore::PannerNode::initialize):
3390         (WebCore::PannerNode::setPanningModel):
3391         * Modules/webaudio/PannerNode.h:
3392         * Modules/webaudio/RealtimeAnalyser.cpp:
3393         * Modules/webaudio/RealtimeAnalyser.h:
3394         * platform/audio/HRTFDatabaseLoader.cpp:
3395         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
3396
3397 2014-11-18  Commit Queue  <commit-queue@webkit.org>
3398
3399         Unreviewed, rolling out r176218.
3400         https://bugs.webkit.org/show_bug.cgi?id=138827
3401
3402         seems to have caused regressions on the perf bots (Requested
3403         by lajava on #webkit).
3404
3405         Reverted changeset:
3406
3407         "[CSS Grid Layout] Upgrade align-self and align-items parsing
3408         to CSS 3"
3409         https://bugs.webkit.org/show_bug.cgi?id=133359
3410         http://trac.webkit.org/changeset/176218
3411
3412 2014-11-18  Joanmarie Diggs  <jdiggs@igalia.com>
3413
3414         AX: [ATK] Crash getting the orientation of a MenuListOption after the MenuList was removed from the document
3415         https://bugs.webkit.org/show_bug.cgi?id=138727
3416
3417         Reviewed by Chris Fleizach.
3418
3419         AccessibilityMenuListOption::elementRect() returns the value of the
3420         grandparent MenuList, asserting that the grandparent exists with that
3421         role. But it is possible to have an existing MenuListOption and remove
3422         the element which had been backing that MenuList from the document.
3423         Adding null checks prior to the assertions prevents our crashing if the
3424         parent or grandparent was removed.
3425
3426         Test: platform/gtk/accessibility/combobox-descendants-orientation-crash.html
3427
3428         * accessibility/AccessibilityMenuListOption.cpp:
3429         (WebCore::AccessibilityMenuListOption::elementRect):
3430
3431 2014-11-17  Benjamin Poulain  <bpoulain@apple.com>
3432
3433         Fix a small indentation mistake in SelectorCodeGenerator::generateNthFilterTest
3434
3435         * cssjit/SelectorCompiler.cpp:
3436         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateNthFilterTest):
3437
3438 2014-11-17  Benjamin Poulain  <benjamin@webkit.org>
3439
3440         Fix two bad function names of HTMLFormControlElement
3441         https://bugs.webkit.org/show_bug.cgi?id=138790
3442
3443         Reviewed by Andreas Kling.
3444
3445         Darin suggested some name improvements in https://bugs.webkit.org/show_bug.cgi?id=138769
3446
3447         * dom/CheckedRadioButtons.cpp:
3448         (WebCore::RadioButtonGroup::add):
3449         (WebCore::RadioButtonGroup::updateCheckedState):
3450         (WebCore::RadioButtonGroup::requiredAttributeChanged):
3451         (WebCore::RadioButtonGroup::remove):
3452         (WebCore::RadioButtonGroup::updateValidityForAllButtons):
3453         (WebCore::RadioButtonGroup::setNeedsValidityCheckForAllButtons): Deleted.
3454         * html/FileInputType.cpp:
3455         (WebCore::FileInputType::setFiles):
3456         * html/HTMLButtonElement.cpp:
3457         (WebCore::HTMLButtonElement::computeWillValidate):
3458         (WebCore::HTMLButtonElement::recalcWillValidate): Deleted.
3459         * html/HTMLButtonElement.h:
3460         * html/HTMLFieldSetElement.h:
3461         * html/HTMLFormControlElement.cpp:
3462         (WebCore::HTMLFormControlElement::requiredAttributeChanged):
3463         (WebCore::HTMLFormControlElement::computeWillValidate):
3464         (WebCore::HTMLFormControlElement::willValidate):
3465         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
3466         (WebCore::HTMLFormControlElement::isValidFormControlElement):
3467         (WebCore::HTMLFormControlElement::updateValidity):
3468         (WebCore::HTMLFormControlElement::setCustomValidity):
3469         (WebCore::HTMLFormControlElement::recalcWillValidate): Deleted.
3470         (WebCore::HTMLFormControlElement::setNeedsValidityCheck): Deleted.
3471         * html/HTMLFormControlElement.h:
3472         * html/HTMLInputElement.cpp:
3473         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
3474         (WebCore::HTMLInputElement::parseAttribute):
3475         (WebCore::HTMLInputElement::setChecked):
3476         (WebCore::HTMLInputElement::setValueInternal):
3477         (WebCore::HTMLInputElement::setValueFromRenderer):
3478         (WebCore::HTMLInputElement::computeWillValidate):
3479         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
3480         (WebCore::HTMLInputElement::recalcWillValidate): Deleted.
3481         * html/HTMLInputElement.h:
3482         * html/HTMLKeygenElement.h:
3483         * html/HTMLOutputElement.h:
3484         * html/HTMLSelectElement.cpp:
3485         (WebCore::HTMLSelectElement::deselectItems):
3486         (WebCore::HTMLSelectElement::optionSelectedByUser):
3487         (WebCore::HTMLSelectElement::listBoxSelectItem):
3488         (WebCore::HTMLSelectElement::add):
3489         (WebCore::HTMLSelectElement::parseAttribute):
3490         (WebCore::HTMLSelectElement::childrenChanged):
3491         (WebCore::HTMLSelectElement::optionElementChildrenChanged):
3492         (WebCore::HTMLSelectElement::setLength):
3493         (WebCore::HTMLSelectElement::selectAll):
3494         (WebCore::HTMLSelectElement::updateListBoxSelection):
3495         (WebCore::HTMLSelectElement::selectOption):
3496         (WebCore::HTMLSelectElement::restoreFormControlState):
3497         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3498         (WebCore::HTMLSelectElement::reset):
3499         * html/HTMLTextAreaElement.cpp:
3500         (WebCore::HTMLTextAreaElement::parseAttribute):
3501         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
3502         (WebCore::HTMLTextAreaElement::setValue):
3503         (WebCore::HTMLTextAreaElement::setNonDirtyValue):
3504
3505 2014-11-17  Sukolsak Sakshuwong  <sukolsak@gmail.com>
3506
3507         Add parsing for :role()
3508         https://bugs.webkit.org/show_bug.cgi?id=138310
3509
3510         Reviewed by Benjamin Poulain.
3511
3512         Add support for parsing :role() pseudo class. The implementation of selector
3513         matching will be in a follow-up patch.
3514
3515         * css/CSSGrammar.y.in:
3516         * css/CSSParser.cpp:
3517         (WebCore::CSSParser::detectFunctionTypeToken):
3518         * css/CSSSelector.cpp:
3519         (WebCore::appendPseudoClassFunctionTail):
3520         (WebCore::CSSSelector::selectorText):
3521         * css/CSSSelector.h:
3522         * css/SelectorChecker.cpp:
3523         (WebCore::SelectorChecker::checkOne):
3524         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
3525         * cssjit/SelectorCompiler.cpp:
3526         (WebCore::SelectorCompiler::addPseudoClassType):
3527
3528 2014-11-17  Simon Fraser  <simon.fraser@apple.com>
3529
3530         [iOS WK1] Sometimes, missing tiles in -webkit-overflow-scrolling: touch in UIWebViews
3531         https://bugs.webkit.org/show_bug.cgi?id=138815
3532         rdar://problem/18746203
3533
3534         Reviewed by Tim Horton.
3535
3536         The scroll-velocity-related data members on FrameView, added in r168233, were uninitialized in UIWebViews,
3537         so FrameView::computeCoverageRect() could return garbage results, leading to too much or too little tile coverage.
3538         
3539         We still add additional coverage from the new inclusion of a margin area, but, for simplicity, leave that the same
3540         between WK1 and WK2 for now.
3541         
3542         * page/FrameView.cpp:
3543         (WebCore::FrameView::FrameView):
3544
3545 2014-11-17  Chris Dumez  <cdumez@apple.com>
3546
3547         Add initial layout testing coverage for timer throttling
3548         https://bugs.webkit.org/show_bug.cgi?id=138809
3549
3550         Reviewed by Simon Fraser.
3551
3552         Add isTimerThrottled() API to Internals so that we can add layout test
3553         coverage for timer throttling.
3554
3555         Tests: fast/dom/nested-timer-invisible-element-throttling.html
3556                fast/dom/nested-timer-visible-element-throttling.html
3557                fast/dom/repeating-timer-invisible-element-throttling.html
3558                fast/dom/repeating-timer-visible-element-throttling.html
3559
3560         * page/DOMTimer.h:
3561         * testing/Internals.cpp:
3562         (WebCore::Internals::isTimerThrottled):
3563         * testing/Internals.h:
3564         * testing/Internals.idl:
3565
3566 2014-11-17  Zalan Bujtas  <zalan@apple.com>
3567
3568         Simple line layout: Rename FlowContentIterator and move implementation to SimpleLineLayoutFlowContents.cpp
3569         https://bugs.webkit.org/show_bug.cgi?id=138799
3570
3571         Reviewed by Antti Koivisto.
3572
3573         This is in preparation to support multiple renderers.
3574         The FlowContents class will be used not just when we create runs, but also when we resolve them at painting time.
3575
3576         No change in functionality.
3577
3578         * CMakeLists.txt:
3579         * WebCore.vcxproj/WebCore.vcxproj:
3580         * WebCore.vcxproj/WebCore.vcxproj.filters:
3581         * WebCore.xcodeproj/project.pbxproj:
3582         * rendering/SimpleLineLayout.cpp:
3583         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3584         (WebCore::SimpleLineLayout::initializeNewLine):
3585         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3586         (WebCore::SimpleLineLayout::nextFragment):
3587         (WebCore::SimpleLineLayout::createLineRuns):
3588         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3589         (WebCore::SimpleLineLayout::createTextRuns):
3590         (WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator): Deleted.
3591         (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition): Deleted.
3592         (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition): Deleted.
3593         (WebCore::SimpleLineLayout::FlowContentIterator::textWidth): Deleted.
3594         (WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter): Deleted.
3595         (WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent): Deleted.
3596         (WebCore::SimpleLineLayout::FlowContentIterator::style): Deleted.
3597         (WebCore::SimpleLineLayout::computeLineLeft): Deleted.
3598         * rendering/SimpleLineLayoutFlowContents.cpp: Added.
3599         (WebCore::SimpleLineLayout::FlowContents::FlowContents):
3600         (WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
3601         (WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
3602         (WebCore::SimpleLineLayout::FlowContents::textWidth):
3603         * rendering/SimpleLineLayoutFlowContents.h: Added.
3604         (WebCore::SimpleLineLayout::FlowContents::Style::Style):
3605         (WebCore::SimpleLineLayout::FlowContents::style):
3606         (WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
3607         (WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
3608
3609 2014-11-17  Daniel Bates  <dabates@apple.com>
3610
3611         Unreviewed, rolling out r176232.
3612
3613         Broke the Mac build. Will investigate offline.
3614
3615         Reverted changeset:
3616
3617         "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
3618         MobileGestalt"
3619         https://bugs.webkit.org/show_bug.cgi?id=138802
3620         http://trac.webkit.org/changeset/176232
3621
3622 2014-11-17  Daniel Bates  <dabates@apple.com>
3623
3624         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
3625         SPI are not available in public SDK
3626         https://bugs.webkit.org/show_bug.cgi?id=138802
3627
3628         Reviewed by David Kilzer.
3629
3630         Add SPI wrapper headers {Dispatch, DynamicLinker, IOPMLib, MachVM, NSPointerFunctions, MobileGestalt}SPI.h
3631         that forward declare applicable libdispatch, dyld, IOKit, mach, Foundation, MobileGestalt SPI
3632         and use these headers instead of the including private headers corresponding to these libraries/frameworks.
3633
3634         * WebCore.xcodeproj/project.pbxproj: Add private headers MobileGestaltSPI.h and
3635         MachVMSPI.h, and project headers DynamicLinkerSPI.h, NSPointerFunctionsSPI.h,
3636         DispatchSPI.h and IOPMLibSPI.h. Also, sort files in Xcode project.
3637         * bindings/objc/DOMInternal.mm: Include header NSPointerFunctionsSPI.h.
3638         * bridge/objc/objc_instance.mm: Ditto; Also, sort #import directives.
3639         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Substitute header IOPMLibSPI.h
3640         for private header IOKit/pwr_mgt/IOPMLib.h.
3641         * platform/cocoa/MemoryPressureHandlerCocoa.mm: Substitute header DispatchSPI.h
3642         for private header dispatch/private.h.
3643         * platform/graphics/ios/FontServicesIOS.mm: Substitute header DynamicLinkerSPI.h
3644         for private header mach-o/dyld_priv.h.
3645         * platform/ios/PlatformScreenIOS.mm: Substitute header MobileGestaltSPI.h for
3646         private header MobileGestalt.h.
3647         * platform/spi/cocoa/DispatchSPI.h: Added.
3648         * platform/spi/cocoa/DynamicLinkerSPI.h: Added.
3649         * platform/spi/cocoa/IOPMLibSPI.h: Added.
3650         * platform/spi/cocoa/MachVMSPI.h: Added.
3651         * platform/spi/cocoa/NSPointerFunctionsSPI.h: Added.
3652         * platform/spi/ios/MobileGestaltSPI.h: Added.
3653
3654 2014-11-17  Daniel Bates  <dabates@apple.com>
3655
3656         [iOS] CoreText and CoreUI SPI are not available in public SDK
3657         https://bugs.webkit.org/show_bug.cgi?id=138760
3658
3659         Reviewed by David Kilzer.
3660
3661         Add a SPI wrapper header CoreUISPI.h that forward declares CoreUI SPI
3662         and use this header instead of including private headers of CoreUI directly.
3663
3664         Additionally, add more forward declarations for CoreText SPI.
3665
3666         * WebCore.xcodeproj/project.pbxproj: Add project header CoreUISPI.h.
3667         * platform/graphics/ios/FontCacheIOS.mm: Include header CoreTextSPI.h instead
3668         of including CoreText headers directly.
3669         * platform/graphics/mac/FontMac.mm: Include header CoreUISPI.h instead
3670         of including CoreUI headers directly.
3671         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Remove unnecessary
3672         include of CoreText headers. These headers will be included by header
3673         CoreTextSPI.h (at the top of the file).
3674         * platform/graphics/mac/SimpleFontDataMac.mm: Remove forward declaration
3675         of CTFontDescriptorIsSystemUIFont() and include of header CTFontDescriptorPriv.h
3676         as this duplicates the logic in CoreTextSPI.h, which is included in this file.
3677         * platform/spi/cocoa/CoreTextSPI.h: Added more forward declarations. Simplified
3678         #include directives.
3679         * platform/spi/ios/CoreUISPI.h: Added.
3680         * rendering/RenderThemeIOS.mm: Move CoreUI externs from this file to file
3681         CoreUISPI.h and include header CoreUISPI.h.
3682
3683 2014-11-17  Zalan Bujtas  <zalan@apple.com>
3684
3685         Simple line layout: Drop 16bit support temporarily.
3686         https://bugs.webkit.org/show_bug.cgi?id=138796
3687
3688         Reviewed by Antti Koivisto.
3689
3690         This is in preparation to multiple renderers support.
3691         It requires code refactoring on top of the coming multiple renderers codebase.
3692         (Not expecting any significant coverage shrinking.)
3693
3694         * rendering/SimpleLineLayout.cpp:
3695         (WebCore::SimpleLineLayout::canUseFor):
3696         (WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
3697         (WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
3698         (WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
3699         (WebCore::SimpleLineLayout::removeTrailingWhitespace):
3700         (WebCore::SimpleLineLayout::initializeNewLine):
3701         (WebCore::SimpleLineLayout::splitFragmentToFitLine):
3702         (WebCore::SimpleLineLayout::nextFragment):
3703         (WebCore::SimpleLineLayout::createLineRuns):
3704         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3705         (WebCore::SimpleLineLayout::createTextRuns):
3706         (WebCore::SimpleLineLayout::create):
3707
3708 2014-11-17  Tim Horton  <timothy_horton@apple.com>
3709
3710         DataDetectors PageOverlay callbacks can come in to the wrong overlay
3711         https://bugs.webkit.org/show_bug.cgi?id=138801
3712         <rdar://problem/18991369>
3713
3714         Reviewed by Anders Carlsson.
3715
3716         * page/PageOverlay.cpp:
3717         (WebCore::generatePageOverlayID):
3718         (WebCore::PageOverlay::PageOverlay):
3719         * page/PageOverlay.h:
3720         Give each PageOverlay a unique ID.
3721
3722 2014-11-17  Javier Fernandez  <jfernandez@igalia.com>
3723
3724         [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
3725         https://bugs.webkit.org/show_bug.cgi?id=133359
3726
3727         Reviewed by David Hyatt.
3728
3729         Broaden justify-self's parsing name as a preparation of migrating
3730         align-self, align-items and justify-items to the CSS 3 Alignment syntax.
3731
3732         The current naming was too tied to justify-self and needs to
3733         be broadened. This will reduce the follow-up implementations'
3734         patches.
3735
3736         Upgrade align-self and align-items parsing to CSS 3
3737
3738         This change migrates the 2 properties to the CSS 3 Alignment
3739         parsing. The new parsing is identical to how we parse
3740         'justify-self'. The 2 properties need to be migrated together
3741         as they are used in tandem in CSSComputedStyleDeclaration.
3742
3743         This change also removes EAlignItems as it is now unused.
3744
3745         Tests: css3/parse-align-items.html
3746                css3/parse-align-self.html
3747
3748         * css/CSSComputedStyleDeclaration.cpp:
3749         (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
3750         (WebCore::ComputedStyleExtractor::propertyValue):
3751         * css/CSSParser.cpp:
3752         (WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
3753         (WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
3754         (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
3755         (WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
3756         (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
3757         (WebCore::CSSParser::parseJustifySelf): Deleted.
3758         * css/CSSParser.h:
3759         * css/CSSPrimitiveValueMappings.h:
3760         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
3761        (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
3762         (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
3763         (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
3764         (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
3765         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
3766         * css/CSSPropertyNames.in:
3767         * css/CSSValueKeywords.in:
3768         * css/StyleResolver.cpp:
3769         (WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the "auto" vale on the alignment properties.
3770         (WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the "auto" vale on the alignment properties. 
3771         (WebCore::StyleResolver::applyProperty):
3772         (WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
3773         (WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
3774         (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
3775         * css/StyleResolver.h:
3776         * rendering/RenderBox.cpp:
3777         (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
3778         * rendering/RenderFlexibleBox.cpp:
3779         (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
3780         (WebCore::resolveAlignment): Consider also that align-items could be "auto", since it's the default now.
3781         (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
3782         (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
3783         (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
3784         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
3785         (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
3786         * rendering/RenderFlexibleBox.h:
3787         * rendering/RenderFullScreen.cpp:
3788         (WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
3789         * rendering/RenderMenuList.cpp:
3790         (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
3791         * rendering/mathml/RenderMathMLRoot.cpp:
3792         (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
3793         * rendering/mathml/RenderMathMLScripts.cpp:
3794         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
3795         (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
3796         * rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
3797         * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
3798         * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
3799         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
3800         (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
3801         * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
3802         * style/StyleResolveTree.cpp:
3803         (WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.
3804
3805 2014-11-17  Shivakumar JM  <shiva.jm@samsung.com>
3806
3807         Attribute text in HTMLAnchorElement should behave as per specification.
3808         https://bugs.webkit.org/show_bug.cgi?id=138557
3809
3810         Reviewed by Darin Adler.
3811
3812         attribute text in HTMLAnchorElement should not be readonly as per specification
3813         http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute. 
3814         Also This matches the behavior of Chrome 38 and FireFox.
3815
3816         Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
3817
3818         * html/HTMLAnchorElement.cpp:
3819         (WebCore::HTMLAnchorElement::text):
3820         (WebCore::HTMLAnchorElement::setText):
3821         * html/HTMLAnchorElement.h:
3822         * html/HTMLAnchorElement.idl:
3823
3824 2014-11-17  Chris Dumez  <cdumez@apple.com>
3825
3826         Throttle timers that change the style of elements outside the viewport
3827         https://bugs.webkit.org/show_bug.cgi?id=138292
3828
3829         Reviewed by Antti Koivisto.
3830
3831         Throttle timers that change the style of elements outside the viewport
3832         to 1 second, similarly to what was already done for timers interacting
3833         with non user observable plugins. To be conservative, we don't throttle
3834         timers that also cause DOM Tree modifications (e.g. adding/removing
3835         nodes, modify element attributes).
3836
3837         On huffingtonpost.com, the CPU usage is at ~17% when the top scrolling
3838         banner is inside the viewport on my machine. Without this patch, CPU
3839         usage would stay ~17% when the banner is outside the viewport. Thanks
3840         to timer throttling, CPU usage now goes down to ~1.5%, without user
3841         observable side effects. The timers get unthrottled when they are
3842         inside the viewport again (i.e. due to scrolling or layout).
3843
3844         On espn.com, the CPU usage goes down from ~7% at the top of the page
3845         to ~1% when scrolling to the bottom of the page. On ebay.com, CPU
3846         usage goes down from ~25% at the top of the page to less than 1% when
3847         scrolling to the bottom of the page.
3848
3849 2014-11-17  peavo@outlook.com  <peavo@outlook.com>
3850
3851         [WinCairo] Compile error, CoreGraphics header file included.
3852         https://bugs.webkit.org/show_bug.cgi?id=138795
3853
3854         Reviewed by Brent Fulgham.
3855
3856         CoreGraphics is not available on WinCairo.
3857
3858         * platform/graphics/win/FontCacheWin.cpp:
3859
3860 2014-11-17  Commit Queue  <commit-queue@webkit.org>
3861
3862         Unreviewed, rolling out r176169.
3863         https://bugs.webkit.org/show_bug.cgi?id=138797
3864
3865         Appears to have broken svg/custom/anchor-on-use.svg (Requested
3866         by ap on #webkit).
3867
3868         Reverted changeset:
3869
3870         "Attribute text in HTMLAnchorElement should behave as per
3871         specification."
3872         https://bugs.webkit.org/show_bug.cgi?id=138557
3873         http://trac.webkit.org/changeset/176169
3874
3875 2014-11-17  Daniel Bates  <dabates@apple.com>
3876
3877         [iOS] AVKit and MediaPlayer SPI are not available in public SDK
3878         https://bugs.webkit.org/show_bug.cgi?id=138756
3879
3880         Reviewed by Eric Carlson.
3881
3882         Add a SPI wrapper headers {AVKit, MPAVRoutingController}SPI.h that forward declares
3883         AVKit and MPAVRoutingController SPI, respectively, and use these header instead of
3884         including private headers of AVKit and MediaPlayer directly.
3885
3886         * WebCore.xcodeproj/project.pbxproj: Add project and private header AVKitSPI.h
3887         and MPAVRoutingControllerSPI.h, respectively.
3888         * platform/audio/ios/MediaSessionManagerIOS.mm: Include header MPAVRoutingControllerSPI.h
3889         instead of including the private header MPAVRoutingController.h.
3890         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include header AVKitSPI.h
3891         instead of including AVKit headers directly.
3892
3893 2014-11-17  Daniel Bates  <dabates@apple.com>
3894
3895         Attempt to fix the Mac build after <https://trac.webkit.org/changeset/176204>
3896         (https://bugs.webkit.org/show_bug.cgi?id=138751)
3897
3898         Move declaration of CAContext to be before the declaration of CALayer since
3899         the latter depends on the former.
3900
3901         * platform/spi/cocoa/QuartzCoreSPI.h:
3902
3903 2014-11-17  Daniel Bates  <dabates@apple.com>
3904
3905         [iOS] QuartzCore SPI not available in public SDK
3906         https://bugs.webkit.org/show_bug.cgi?id=138751
3907
3908         Reviewed by David Kilzer.
3909
3910         Add a SPI wrapper header called QuartzCoreSPI.h that forward declares
3911         QuartzCore SPI and use this header instead of including private headers
3912         of QuartzCore directly.
3913
3914         * WebCore.xcodeproj/project.pbxproj: Added private header QuartzCoreSPI.h.
3915         * platform/graphics/ca/mac/PlatformCAFiltersMac.h: Removed; incorporated its
3916         functionality into QuartzCoreSPI.h.
3917         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Substitute header
3918         QuartzCoreSPI.h for PlatformCAFiltersMac.h as the content of the latter
3919         was incorporated into the former.
3920         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Move CALayer and CATiledLayer
3921         forward declarations from this file to file QuartzCoreSPI.h and include
3922         header QuartzCoreSPI.h instead of including CATiledLayerPrivate.h directly. Also
3923         remove header PlatformCAFiltersMac.h as its content is incorporated into QuartzCoreSPI.h
3924         * platform/ios/LegacyTileCache.mm: Include headers CoreGraphicsSPI.h and QuartzCoreSPI.h
3925         instead of including QuartzCore headers directly.
3926         * platform/ios/LegacyTileGrid.mm: Include header QuartzCoreSPI.h instead
3927         of including QuartzCore headers directly. Also sort the list of #include directives.
3928         * platform/ios/LegacyTileGridTile.mm: Include header QuartzCoreSPI.h
3929         instead of including QuartzCore headers directly.
3930         * platform/spi/cocoa/QuartzCoreSPI.h: Added.
3931
3932 2014-11-17  Chris Dumez  <cdumez@apple.com>
3933
3934         Move more CSS properties to the new StyleBuilder
3935         https://bugs.webkit.org/show_bug.cgi?id=138766
3936
3937         Reviewed by Darin Adler.
3938
3939         Move more CSS properties from DeprecatedStyleBuilder to the new
3940         StyleBuilder:
3941         line-height
3942         word-spacing
3943         -webkit-marquee-repetition
3944         -webkit-text-underline-position
3945
3946         No new tests, no behavior change.
3947
3948         * css/CSSPropertyNames.in:
3949         * css/DeprecatedStyleBuilder.cpp:
3950         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
3951         (WebCore::csstoLengthConversionDataWithTextZoomFactor): Deleted.
3952         (WebCore::ApplyPropertyMarqueeRepetition::applyValue): Deleted.
3953         (WebCore::ApplyPropertyMarqueeRepetition::createHandler): Deleted.
3954         (WebCore::ApplyPropertyTextUnderlinePosition::applyValue): Deleted.
3955         (WebCore::ApplyPropertyTextUnderlinePosition::createHandler): Deleted.
3956         (WebCore::ApplyPropertyLineHeight::applyValue): Deleted.
3957         (WebCore::ApplyPropertyLineHeight::createHandler): Deleted.
3958         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyValue): Deleted.
3959         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInitialValue): Deleted.
3960         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::applyInheritValue): Deleted.
3961         (WebCore::ApplyPropertyLineHeightForIOSTextAutosizing::createHandler): Deleted.
3962         (WebCore::ApplyPropertyWordSpacing::applyValue): Deleted.
3963         (WebCore::ApplyPropertyWordSpacing::createHandler): Deleted.
3964         * css/StyleBuilderConverter.h:
3965         (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
3966         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
3967         * css/StyleBuilderCustom.h:
3968         (WebCore::StyleBuilderFunctions::csstoLengthConversionDataWithTextZoomFactor):
3969         (WebCore::StyleBuilderFunctions::convertLineHeight):
3970         (WebCore::StyleBuilderFunctions::applyValueWordSpacing):
3971         (WebCore::StyleBuilderFunctions::applyInheritLineHeight):
3972         (WebCore::StyleBuilderFunctions::applyInitialLineHeight):
3973         (WebCore::StyleBuilderFunctions::applyValueLineHeight):
3974
3975 2014-11-16  Andreas Kling  <akling@apple.com>
3976
3977         Avoid synchronous style recalc when mutating a Node inside FrameSelection.
3978         <https://webkit.org/b/138791>
3979
3980         Reviewed by Antti Koivisto.
3981
3982         We can safely clear the RenderView's selection without doing a synchronous
3983         style recalc first.
3984
3985         This is a small progression on Speedometer locally.
3986
3987         * editing/FrameSelection.cpp:
3988         (WebCore::DragCaretController::nodeWillBeRemoved):
3989         (WebCore::FrameSelection::respondToNodeModification):
3990         (WebCore::clearRenderViewSelection): Deleted.
3991
3992             Merged clearRenderViewSelection() into the call sites and removed
3993             the now-unnecessary protection of the Document.
3994
3995 2014-11-17  Eric Carlson  <eric.carlson@apple.com>
3996
3997         [iOS] allow host application to opt-out of alternate fullscreen
3998         https://bugs.webkit.org/show_bug.cgi?id=138787
3999
4000         Reviewed by Darin Adler.
4001
4002         * Modules/mediacontrols/MediaControlsHost.cpp:
4003         (WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
4004
4005         * html/HTMLMediaElement.cpp:
4006         (WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
4007             mediaSession().allowsAlternateFullscreen says it isn't allowed.
4008
4009         * html/HTMLMediaSession.cpp:
4010         (WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
4011         * html/HTMLMediaSession.h:
4012
4013         * page/Settings.cpp: Add allowsAlternateFullscreen.
4014         * page/Settings.in: Ditto.
4015
4016 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
4017
4018         Replace RenderSVGResource::cast<T>() with downcast<T>()
4019         https://bugs.webkit.org/show_bug.cgi?id=138290
4020
4021         Reviewed by Chris Dumez.
4022
4023         Add type traits for the RenderSVGResource hierarchy. This enables
4024         using the typecasting framework in getRenderSVGResourceById() that
4025         in return renders the RenderSVGResource::cast<>() template and all
4026         the static s_resourceType member variables in the hierarchy removable.
4027
4028         * WebCore.order:
4029         * rendering/svg/RenderSVGResource.h:
4030         (WebCore::RenderSVGResource::cast): Deleted.
4031         * rendering/svg/RenderSVGResourceClipper.h:
4032         * rendering/svg/RenderSVGResourceContainer.h:
4033         (WebCore::getRenderSVGResourceById):
4034         * rendering/sv