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