39eb3c9b1d781d9452c3854d5f53c0eaf06ba1b7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-05-29  Jer Noble  <jer.noble@apple.com>
2
3         Unreviewed build fix; remove unintentional semicolon.
4
5         * Modules/webaudio/AudioScheduledSourceNode.cpp:
6         (WebCore::AudioScheduledSourceNode::finish):
7
8 2013-05-29  Anders Carlsson  <andersca@apple.com>
9
10         Merge PODArea::Chunk into PODFreeListArena::FreeListChunk
11         https://bugs.webkit.org/show_bug.cgi?id=117000
12
13         Reviewed by Oliver Hunt.
14
15         * platform/PODArena.h:
16         (WebCore::PODArena::roundUp):
17         * platform/PODFreeListArena.h:
18         (PODFreeListArena):
19         (WebCore::PODFreeListArena::FreeListChunk::FreeListChunk):
20         (FreeListChunk):
21         (WebCore::PODFreeListArena::FreeListChunk::~FreeListChunk):
22         (WebCore::PODFreeListArena::FreeListChunk::allocate):
23
24 2013-05-29  Anders Carlsson  <andersca@apple.com>
25
26         Move some PODArena members to PODFreeListArena
27         https://bugs.webkit.org/show_bug.cgi?id=116993
28
29         Reviewed by Sam Weinig.
30
31         This is more work towards merging the two classes.
32
33         * platform/PODArena.h:
34         (PODArena):
35         * platform/PODFreeListArena.h:
36         (PODFreeListArena):
37         (WebCore::PODFreeListArena::PODFreeListArena):
38
39 2013-05-29  Jer Noble  <jer.noble@apple.com>
40
41         [Mac] Scrubbing long movie files results in timeline snapping back to 0 during scrub.
42         https://bugs.webkit.org/show_bug.cgi?id=116986
43
44         Reviewed by Eric Carlson.
45
46         Keep a count of the number of in-flight seek requests, and only issue a timeupdate
47         (which triggers a "seeked" event) when the final seek completes.
48
49         Test: media/video-seek-multiple.html
50
51         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
52         (WebCore::MediaPlayerPrivateAVFoundation::seek):
53         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
54         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
55         (MediaPlayerPrivateAVFoundation):
56
57 2013-05-29  Anders Carlsson  <andersca@apple.com>
58
59         Remove unused code from PODArena
60         https://bugs.webkit.org/show_bug.cgi?id=116990
61
62         Reviewed by Sam Weinig.
63
64         PODArena is only used as a base class of PODFreeListArena so remove unused member functions and make all
65         members protected to make it impossible to use it without subclassing.
66
67         PODArena is a risky class to use since it doesn't return memory to the system unless the arena object is destroyed.
68         This was the reason why PODFreeListArea was added. An upcoming patch will merge PODArena with PODFreeListArena and
69         this is a small step towards that goal.
70
71         * platform/PODArena.h:
72
73 2013-05-29  Darin Adler  <darin@apple.com>
74
75         Remove custom binding for Clipboard setDragImage function
76         https://bugs.webkit.org/show_bug.cgi?id=116422
77
78         Reviewed by Sam Weinig.
79
80         * bindings/js/JSClipboardCustom.cpp: Removed setDragImage binding.
81
82         * dom/Clipboard.cpp:
83         (WebCore::Clipboard::canSetDragImage): Added a condition that this is a drag
84         and drop clipboard. That used to be checked in the setDragImage binding.
85         (WebCore::Clipboard::setDragImage): Added a version that takes an Element
86         and calls through to the existing functions (in the legacy code path), or handles
87         both the Element and HTMLImageElement not-in-document cases (in the new code path).
88
89         * dom/Clipboard.h: Updated for changes above.
90
91         * dom/Clipboard.idl: Removed [Custom] from setDragImage.
92
93         * page/EventHandler.cpp:
94         (WebCore::EventHandler::handleDrag): Call the new setDragImage instead of the
95         old setDragImageElement.
96
97 2013-05-29  Praveen R Jadhav  <praveen.j@samsung.com>
98
99         Cleanup AudioSourceNode.idl from WebKit build.
100         https://bugs.webkit.org/show_bug.cgi?id=116905.
101
102         Reviewed by Darin Adler.
103
104         AudioSourceNode.idl is not part of WebAudio Specifications anymore.
105         AudioNode is inherited directly in all the audio source nodes.
106
107         No new tests. Current test cases will cover all the scenarios.
108
109         * CMakeLists.txt:
110         * DerivedSources.make:
111         * DerivedSources.pri:
112         * GNUmakefile.list.am:
113         * Modules/webaudio/AudioBufferSourceNode.h:
114         * Modules/webaudio/AudioBufferSourceNode.idl:
115         * Modules/webaudio/AudioScheduledSourceNode.cpp:
116         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
117         * Modules/webaudio/AudioScheduledSourceNode.h:
118         * Modules/webaudio/AudioSourceNode.h: Removed.
119         * Modules/webaudio/AudioSourceNode.idl: Removed.
120         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
121         (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode):
122         * Modules/webaudio/MediaElementAudioSourceNode.h:
123         (MediaElementAudioSourceNode):
124         * Modules/webaudio/MediaElementAudioSourceNode.idl:
125         * Modules/webaudio/MediaStreamAudioDestinationNode.idl:
126         * Modules/webaudio/MediaStreamAudioSourceNode.cpp:
127         (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode):
128         * Modules/webaudio/MediaStreamAudioSourceNode.h:
129         (MediaStreamAudioSourceNode):
130         * Modules/webaudio/MediaStreamAudioSourceNode.idl:
131         * Modules/webaudio/OscillatorNode.h:
132         * Modules/webaudio/OscillatorNode.idl:
133         * Target.pri:
134         * WebCore.xcodeproj/project.pbxproj:
135
136 2013-05-29  Adam Barth  <abarth@webkit.org>
137
138         Optimize RenderText::offsetNext for 8 bit strings
139         https://bugs.webkit.org/show_bug.cgi?id=116877
140
141         Reviewed by Darin Adler.
142
143         Previously, this function was always upconverting strings to 16 bits in
144         order to create a cursorMovementIterator. This patch adds a fast path
145         for ASCII and Latin-1 strings, which don't need this complicated cursor
146         movement logic.
147
148         I ran into this code because nextOffset showed up as a memory pig on a
149         memory profile of Mobile Gmail.
150
151         Test: editing/selection/move-by-character-brute-force.html
152
153         * rendering/RenderText.cpp:
154         (WebCore::RenderText::previousOffset):
155         (WebCore::RenderText::nextOffset):
156
157 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
158
159         [Windows] Correct copy command (form versus forms)
160
161         * WebCore.vcproj/copyForwardingHeaders.cmd:
162         * WebCore.vcxproj/copyForwardingHeaders.cmd:
163
164 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
165
166         [CSS Shapes] Fix style issues in BasicShapes
167         https://bugs.webkit.org/show_bug.cgi?id=116734
168
169         Reviewed by Alexandru Chiculita.
170
171         Fix indentation in BasicShapes.cpp, and change enums to respect the
172         style rules CamelCase instead of HAVING_UNDERSCORES.
173
174         No new tests, only style changes.
175
176         * css/BasicShapeFunctions.cpp:
177         (WebCore::valueForBasicShape):
178         (WebCore::basicShapeForValue):
179         * css/CSSBasicShapes.cpp:
180         (WebCore::buildRectangleString):
181         (WebCore::CSSBasicShapeRectangle::equals):
182         (WebCore::CSSBasicShapeCircle::equals):
183         (WebCore::CSSBasicShapeEllipse::equals):
184         (WebCore::CSSBasicShapePolygon::equals):
185         (WebCore::CSSBasicShapeInsetRectangle::equals):
186         * css/CSSBasicShapes.h:
187         (WebCore::CSSBasicShapeRectangle::type):
188         (WebCore::CSSBasicShapeInsetRectangle::type):
189         (WebCore::CSSBasicShapeCircle::type):
190         (WebCore::CSSBasicShapeEllipse::type):
191         (WebCore::CSSBasicShapePolygon::type):
192         * rendering/ExclusionShape.cpp:
193         (WebCore::ExclusionShape::createExclusionShape):
194         * rendering/ExclusionShapeInsideInfo.cpp:
195         (WebCore::ExclusionShapeInsideInfo::isEnabledFor):
196         * rendering/ExclusionShapeOutsideInfo.cpp:
197         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor):
198         * rendering/style/BasicShapes.cpp:
199         (WebCore::BasicShape::canBlend):
200         (WebCore::BasicShapeRectangle::path):
201         (WebCore::BasicShapeCircle::path):
202         (WebCore::BasicShapeEllipse::path):
203         (WebCore::BasicShapeInsetRectangle::path):
204         * rendering/style/BasicShapes.h:
205         (WebCore::BasicShapeRectangle::type):
206         (WebCore::BasicShapeCircle::type):
207         (WebCore::BasicShapeEllipse::type):
208         (WebCore::BasicShapePolygon::type):
209         (WebCore::BasicShapeInsetRectangle::type):
210
211 2013-05-29  Otto Derek Cheung  <otcheung@rim.com>
212
213         [BlackBerry] Handle Host-Only cookies
214         https://bugs.webkit.org/show_bug.cgi?id=116969
215
216         PR 338809
217         Reviewed by Rob Buis.
218         Internally Reviewed by Joe Mason.
219
220         Adding support for host-only cookies (cookies with no
221         specified domains). These cookies should only be returned
222         when the host matches the cookie domain exactly.
223
224         Tested using Opera and Browser cookie test suite. Tested
225         that host cookies are being stored in it's own map using
226         Web Inspector.
227
228         * platform/blackberry/CookieManager.cpp:
229         (WebCore::CookieManager::getRawCookies):
230         (WebCore::CookieManager::checkAndTreatCookie):
231         (WebCore::CookieManager::findOrCreateCookieMap):
232         * platform/blackberry/CookieParser.cpp:
233         (WebCore::CookieParser::CookieParser):
234         (WebCore::CookieParser::parseOneCookie):
235         * platform/blackberry/ParsedCookie.h:
236         (WebCore::ParsedCookie::isHostOnly):
237         (ParsedCookie):
238
239 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
240
241         Remove the size of DataVector in HTMLToken
242         https://bugs.webkit.org/show_bug.cgi?id=116931
243
244         Reviewed by Sam Weinig.
245
246         Merge https://chromium.googlesource.com/chromium/blink/+/7977721e62c471bfa17b84d82cd5d8243a4eb9a9.
247
248         Shink HTMLToken by 1.5 kB
249
250         HTMLToken has an inline vector for buffering characters during tokenization. We
251         originally picked the inline capacity of this buffer somewhat arbitrarily. This
252         CL tunes the number based on a somewhat non-scientific browse of a number of
253         popular web sites.
254
255         I (abarth) instrumented content_shell to log the length of each complete DataVector. I
256         then browsed around a variety of web sites to collect data. The 99% percentile
257         of DataVector lengths was just shy of 250 characters. I rounded that up to 256
258         because powers of two are pretty. That means we'll malloc an external buffer
259         less than 1% of the time, which seems fine.
260
261         * html/parser/HTMLToken.h:
262         (HTMLToken):
263
264 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
265
266         [Windows] Build correction after r150837
267
268         New 'forms' sub-folder of html needs to be included in
269         copy operations.
270
271         * WebCore.vcproj/copyForwardingHeaders.cmd: copy html/forms.
272         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Use correct
273         'obj32' folder for build output.
274         * WebCore.vcxproj/copyForwardingHeaders.cmd: copy html/forms.
275
276 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
277
278         [BlackBerry] Radio Button UX updates.
279         https://bugs.webkit.org/show_bug.cgi?id=116881
280
281         Reviewed by Rob Buis.
282
283         BlackBerry PR 342322.
284         Internally Reviewed by Jeff Rogers.
285         Change images.
286
287         * platform/blackberry/RenderThemeBlackBerry.cpp:
288         (WebCore::RenderThemeBlackBerry::paintRadio):
289
290 2013-05-29  Tiancheng Jiang  <tijiang@rim.com>
291
292         [BlackBerry] Datetime string is not centred in form controls.
293         https://bugs.webkit.org/show_bug.cgi?id=100760
294
295         Reviewed by Rob Buis.
296
297         BlackBerry PR 343512
298         Internally Reviewed by Jeff Rogers.
299
300         Adjust margin for inner text node of datetime form controls.
301
302         * css/themeBlackBerry.css:
303         (input::-webkit-date-and-time-value):
304
305 2013-05-29  Brent Fulgham  <bfulgham@apple.com>
306
307         [Windows] Build correction after r150876
308
309         A clean build will now fail because the BaseMultipleFieldsDateAndTimeInputType sources have
310         been removed, but are still referenced in the project file.
311
312         * WebCore.vcxproj/WebCore.vcxproj: Remove reference to BaseMultipleFieldsDateAndTimeInputType
313         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
314
315 2013-05-28  Jer Noble  <jer.noble@apple.com>
316
317         Support the 'onended' EventListener property for AudioBufferSourceNode and OscillatorNode.
318         https://bugs.webkit.org/show_bug.cgi?id=116798
319
320         Reviewed by Eric Carlson.
321
322         Tests: webaudio/audiobuffersource-ended.html
323                webaudio/oscillator-ended.html
324
325         * Modules/webaudio/AudioScheduledSourceNode.cpp:
326         (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode):
327         (WebCore::AudioScheduledSourceNode::setOnended): Set m_hasEndedListener.
328         (WebCore::AudioScheduledSourceNode::finish): Call notifyEndedDispatch on the main thread.
329         (WebCore::AudioScheduledSourceNode::notifyEndedDispatch): Call notifyEnded().
330         (WebCore::AudioScheduledSourceNode::notifyEnded): Call the onended event listener.
331         * Modules/webaudio/AudioScheduledSourceNode.h:
332         (WebCore::AudioScheduledSourceNode::onended): Added boilerplate.
333         * Modules/webaudio/AudioBufferSourceNode.idl: Added the onerror attribute.
334         * Modules/webaudio/OscillatorNode.idl: Ditto.
335
336 2013-05-29  Bem Jones-Bey  <bjonesbe@adobe.com>
337
338         [CSS Shapes] Support parsing inset-rectangle shapes
339         https://bugs.webkit.org/show_bug.cgi?id=116638
340
341         Reviewed by Dean Jackson.
342
343         Add parsing for inset-rectangle. It's very similar to parsing for
344         rectangle.
345
346         No new tests, updated existing tests to cover this.
347
348         * css/BasicShapeFunctions.cpp:
349         (WebCore::valueForBasicShape): Add support for inset rectangles.
350         (WebCore::basicShapeForValue): Add support for inset rectangles.
351         * css/CSSBasicShapes.cpp:
352         (WebCore::buildInsetRectangleString): Create an inset-rectangle css
353             string.
354         (WebCore::CSSBasicShapeInsetRectangle::cssText): Convert inset
355             rectangle shape to a CSS string.
356         (WebCore::CSSBasicShapeInsetRectangle::equals): Compare two inset
357             rectangles.
358         (WebCore::CSSBasicShapeInsetRectangle::serializeResolvingVariables):
359             Create an inset rectangle string, with CSS variables resolved.
360         (WebCore::CSSBasicShapeInsetRectangle::hasVariableReference):
361             Determine if this inset rectangle has any CSS Variable references.
362         * css/CSSBasicShapes.h:
363         (CSSBasicShapeInsetRectangle): Add inset rectangle class. This is a
364             direct representation of the CSS property. All the methods below
365             are just simple getters and setters, along with a construtor and a
366             factory method.
367         (WebCore::CSSBasicShapeInsetRectangle::create): 
368         (WebCore::CSSBasicShapeInsetRectangle::top): 
369         (WebCore::CSSBasicShapeInsetRectangle::right):
370         (WebCore::CSSBasicShapeInsetRectangle::bottom):
371         (WebCore::CSSBasicShapeInsetRectangle::left):
372         (WebCore::CSSBasicShapeInsetRectangle::radiusX):
373         (WebCore::CSSBasicShapeInsetRectangle::radiusY):
374         (WebCore::CSSBasicShapeInsetRectangle::setTop):
375         (WebCore::CSSBasicShapeInsetRectangle::setRight):
376         (WebCore::CSSBasicShapeInsetRectangle::setBottom):
377         (WebCore::CSSBasicShapeInsetRectangle::setLeft):
378         (WebCore::CSSBasicShapeInsetRectangle::setRadiusX):
379         (WebCore::CSSBasicShapeInsetRectangle::setRadiusY):
380         (WebCore::CSSBasicShapeInsetRectangle::type):
381         (WebCore::CSSBasicShapeInsetRectangle::CSSBasicShapeInsetRectangle):
382         (WebCore):
383         * css/CSSParser.cpp:
384         (WebCore::CSSParser::parseBasicShapeInsetRectangle): Parse the
385             inset-rectangle CSS property and create a
386             CSSBasicShapeInsetRectangle.
387         (WebCore::CSSParser::parseBasicShape): Add a call to parse
388             inset-rectangle.
389         * rendering/ExclusionShapeInsideInfo.cpp:
390         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Disable
391             inset-rectangles, since only the parsing has been implemented so
392             far.
393         * rendering/ExclusionShapeOutsideInfo.cpp:
394         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Disable
395             inset-rectangles, since only the parsing has been implemented so
396             far.
397         * rendering/style/BasicShapes.cpp:
398         (WebCore::BasicShapeInsetRectangle::path): Calculate the Path for an
399             inset-rectangle.
400         (WebCore::BasicShapeInsetRectangle::blend): Blend two inset rectangles
401             together at a point depending on the "progress" and return the
402             blended rectangle.
403         * rendering/style/BasicShapes.h:
404         (BasicShapeInsetRectangle): Add higher level inset rectangle class.
405             This is used outside of the CSS representation. The methods below
406             are just simple getters and setters, along with a constructor and
407             a factory method.
408         (WebCore::BasicShapeInsetRectangle::create):
409         (WebCore::BasicShapeInsetRectangle::top):
410         (WebCore::BasicShapeInsetRectangle::right):
411         (WebCore::BasicShapeInsetRectangle::bottom):
412         (WebCore::BasicShapeInsetRectangle::left):
413         (WebCore::BasicShapeInsetRectangle::cornerRadiusX):
414         (WebCore::BasicShapeInsetRectangle::cornerRadiusY):
415         (WebCore::BasicShapeInsetRectangle::setTop):
416         (WebCore::BasicShapeInsetRectangle::setRight):
417         (WebCore::BasicShapeInsetRectangle::setBottom):
418         (WebCore::BasicShapeInsetRectangle::setLeft):
419         (WebCore::BasicShapeInsetRectangle::setCornerRadiusX):
420         (WebCore::BasicShapeInsetRectangle::setCornerRadiusY):
421         (WebCore::BasicShapeInsetRectangle::type):
422         (WebCore::BasicShapeInsetRectangle::BasicShapeInsetRectangle):
423
424 2013-05-29  Andreas Kling  <akling@apple.com>
425
426         Move computed style extraction out of CSSComputedStyleDeclaration.
427         <http://webkit.org/b/116965>
428
429         Reviewed by Antti Koivisto.
430
431         Make it possible to get computed CSSValues from a Node without creating a CSSOM
432         style declaration object.
433
434         The bulk of the logic moves to a new class; ComputedStyleExtractor, which can be created
435         on the stack, and takes the same setup variables as CSSComputedStyleDeclaration.
436
437         This is prep to enable futuristic optimizations in editing and elsewhere.
438
439         * css/CSSComputedStyleDeclaration.h:
440         * css/CSSComputedStyleDeclaration.cpp:
441         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
442
443             Create a ComputedStyleExtractor to do the work!
444
445         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
446         (WebCore::ComputedStyleExtractor::valueForFilter):
447         (WebCore::ComputedStyleExtractor::ComputedStyleExtractor):
448         (WebCore::ComputedStyleExtractor::valueForShadow):
449         (WebCore::ComputedStyleExtractor::styledNode):
450         (WebCore::ComputedStyleExtractor::propertyValue):
451         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
452         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
453         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
454         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
455         * css/SVGCSSComputedStyleDeclaration.cpp:
456         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
457         (WebCore::ComputedStyleExtractor::svgPropertyValue):
458
459             Moved all of these from CSSComputedStyleDeclaration to the new class.
460
461         * rendering/style/RenderStyle.h:
462         * svg/SVGPaint.h:
463
464             Have these two befriend ComputedStyleExtractor.
465
466 2013-05-29  Antti Koivisto  <antti@apple.com>
467
468         Another attempt to fix windows build.
469         
470         Not reviewed.
471
472         * css/CSSFontSelector.h:
473
474 2013-05-29  Antti Koivisto  <antti@apple.com>
475
476         Try to fix window build.
477         
478         Not reviewed.
479
480         * platform/graphics/FontCache.h:
481         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
482
483 2013-05-29  Simon Fraser  <simon.fraser@apple.com>
484
485         Fix the firing of m_paintRelatedMilestonesTimer
486         https://bugs.webkit.org/show_bug.cgi?id=116919
487
488         Reviewed by Tim Horton.
489
490         r150671 intended to change things so that paint-related milestones
491         only fire when painting has actually happened, so that WebKit clients
492         are notified when we actually have bits to present.
493         
494         However, it made an incorrect assumption that painting would happen
495         inside of flushCompositingState(). This is not the case; flushCompositingState()
496         will just dirty CALayers, and later on Core Animation will ask us to paint them.
497         
498         This incorrect assumption meant that we would never start the
499         m_paintRelatedMilestonesTimer, so never fire the milestones.
500         
501         Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking
502         paintContents call back. At this time we know we're painting, so we can both
503         set the FrameView's last paint time, and start up the timer. We also only
504         want to start the timer if there are pending milestones.
505
506         * rendering/RenderLayerBacking.cpp:
507         (WebCore::RenderLayerBacking::paintIntoLayer):
508         (WebCore::RenderLayerBacking::paintContents):
509         * rendering/RenderLayerCompositor.cpp:
510         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
511         (WebCore::RenderLayerCompositor::didPaintBacking):
512         * rendering/RenderLayerCompositor.h:
513         (RenderLayerCompositor):
514
515 2013-05-29  Antti Koivisto  <antti@apple.com>
516
517         Share FontGlyphs
518         https://bugs.webkit.org/show_bug.cgi?id=116863
519
520         Reviewed by Anreas Kling.
521
522         Style system generates many Font objects that are identical or similar enough to have identical FontGlyphs. 
523         We can figure out that the FontGlyphs are going to be the same and share them. This reduces memory usage.
524         It also improves performance as the glyph cache and the width cache hang from FontGlyphs and their hit rate
525         increases.
526         
527         On PLT3 this takes the number of live FontGlyphs at the end from 40k+ to <1k. Width cache hit rate improves
528         from ~42% to ~55%.
529
530         * css/CSSFontSelector.cpp:
531         (WebCore::CSSFontSelector::CSSFontSelector):
532         
533             Add unique id we can use in cache key.
534
535         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
536         
537             Bump the version number on invalidation so we don't reuse cache entries after web font is loaded.
538
539         (WebCore::CSSFontSelector::resolvesFamilyFor):
540         
541             Test if FontSelector is needed for resolving a particular FontDescription.
542
543         * css/CSSFontSelector.h:
544         * page/Settings.cpp:
545         (WebCore::setGenericFontFamilyMap):
546         
547             Invalidate the cache if standard font settings change.
548
549         * platform/graphics/Font.cpp:
550         (FontGlyphsCacheKey):
551         (FontGlyphsCacheEntry):
552         (WebCore::operator==):
553         (WebCore::fontGlyphsCache):
554         (WebCore::invalidateFontGlyphsCache):
555         (WebCore::makeFontSelectorFlags):
556         (WebCore::makeFontGlyphsCacheKey):
557         
558             The cache key consists of
559             
560             - all families.
561             - shared key with the lower level FontData cache (FontCache), guaranteeing FontDatas would be identical.
562             - font selector specific keys.
563
564             These guarantee the FontData will be identical.
565
566         (WebCore::computeFontGlyphsCacheHash):
567         (WebCore::pruneUnreferencedFromFontGlyphsCache):
568         
569             Don't accumulate unused entries.
570
571         (WebCore::retrieveOrAddCachedFontGlyphs):
572         (WebCore::Font::update):
573         * platform/graphics/Font.h:
574         * platform/graphics/FontCache.cpp:
575         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
576         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
577         (WebCore::FontPlatformDataCacheKey::operator==):
578         (FontPlatformDataCacheKey):
579         (WebCore::computeHash):
580         (WebCore::FontCache::getCachedFontPlatformData):
581         (WebCore::FontCache::purgeInactiveFontData):
582         (WebCore::FontCache::invalidate):
583         * platform/graphics/FontCache.h:
584         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey):
585         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey):
586         (WebCore::FontDescriptionFontDataCacheKey::operator==):
587         (WebCore::FontDescriptionFontDataCacheKey::operator!=):
588         (WebCore::FontDescriptionFontDataCacheKey::computeHash):
589         
590             Separate part of the key for sharing.
591
592         (FontDescriptionFontDataCacheKey):
593         * platform/graphics/FontFallbackList.cpp:
594         (WebCore::FontGlyphs::FontGlyphs):
595         (WebCore::FontGlyphs::releaseFontData):
596         * platform/graphics/FontFallbackList.h:
597         (WebCore::FontGlyphs::create):
598         (WebCore::FontGlyphs::~FontGlyphs):
599         
600             Remove invalidate(). If FontGlyphs needs invalidation it is reconstructed.
601
602         * platform/graphics/FontSelector.h:
603
604 2013-05-29  Nico Weber  <thakis@chromium.org>
605
606         Remove unused file PlatformGestureEvent.cpp
607         https://bugs.webkit.org/show_bug.cgi?id=116894
608
609         Reviewed by Darin Adler.
610
611         This was added in https://bugs.webkit.org/show_bug.cgi?id=49345 but
612         not removed in https://bugs.webkit.org/show_bug.cgi?id=77492 which
613         removed most of that code again.
614         
615         * platform/PlatformGestureRecognizer.cpp: Removed.
616
617 2013-05-29  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
618
619         [texmap][GStreamer][GTK] Composited Video support
620         https://bugs.webkit.org/show_bug.cgi?id=86410
621
622         Reviewed by Noam Rosenthal.
623
624         Enable the video accelerated compositing using the WebKit's
625         TextureMapper.
626
627         This patch does not use hardware accelerated video decoding. It
628         provides a generic path for system memory buffers.
629
630         This new functionality is only available when the coordinated graphics
631         system is not used.
632
633         No new tests, already covered by existing tests.
634
635         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
636         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
637         (WebCore):
638         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture): update the
639         texture content with the new received video buffer.
640         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint): choose to
641         use the accelerated compositing or the normal code path
642         (WebCore::MediaPlayerPrivateGStreamerBase::paint): if accelerated
643         compositing is used this method is halted.
644         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper): get
645         a texture from the pool and draws it if it is already available.
646         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
647         (MediaPlayerPrivateGStreamerBase):
648         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer): returns itself
649         (WebCore::MediaPlayerPrivateGStreamerBase::supportsAcceleratedRendering):
650         returns true
651
652 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
653
654         [Qt] Missing files from build after r150853
655         https://bugs.webkit.org/show_bug.cgi?id=116932
656
657         Reviewed by Csaba Osztrogonác.
658
659         * Target.pri: Added missing include path.
660
661 2013-05-29  Mihai Maerean  <mmaerean@adobe.com>
662
663         [CSS Regions] Content that has overflow: scroll cannot be scrolled by dragging the scroll thumbs with the mouse
664         https://bugs.webkit.org/show_bug.cgi?id=113703
665
666         Reviewed by Darin Adler.
667
668         The point inside a box that's inside a region has its coordinates relative to the region, not the FlowThread
669         that is its container in the RenderObject tree.
670
671         Previously, the coordinates were computed relatively to the FlowThread which doesn't really have a location in
672         the page.
673
674         Tests: fast/regions/drag-scrollbars-of-content.html
675                fast/regions/hover-in-second-region.html
676
677         * rendering/RenderBox.cpp:
678         (WebCore::RenderBox::offsetFromContainer):
679         * rendering/RenderBoxModelObject.cpp:
680         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
681
682 2013-05-29  Andreas Kling  <akling@apple.com>
683
684         Fix dumb typo in r150879.
685
686         * editing/htmlediting.cpp:
687         (WebCore::nextLeafNode):
688
689 2013-05-29  Andreas Kling  <akling@apple.com>
690
691         Move leaf Node traversal helpers to htmlediting.cpp
692         <http://webkit.org/b/116940>
693
694         Reviewed by Antti Koivisto.
695
696         Move Node::previousLeafNode() and Node::nextLeafNode() to htmlediting.cpp along with their helpers.
697         Fixes an 8-year old FIXME. \o/
698
699         * dom/Node.h:
700         * dom/Node.cpp:
701         * dom/Position.cpp:
702         (WebCore::nextRenderedEditable):
703         (WebCore::previousRenderedEditable):
704         * editing/VisibleUnits.cpp:
705         (WebCore::previousLeafWithSameEditability):
706         (WebCore::nextLeafWithSameEditability):
707         * editing/htmlediting.h:
708         * editing/htmlediting.cpp:
709         (WebCore::previousNodeConsideringAtomicNodes):
710         (WebCore::nextNodeConsideringAtomicNodes):
711         (WebCore::previousLeafNode):
712         (WebCore::nextLeafNode):
713
714 2013-05-29  Peter Gal  <galpeter@inf.u-szeged.hu>
715
716         [Qt] Missing files from build after r150853
717         https://bugs.webkit.org/show_bug.cgi?id=116932
718
719         Reviewed by Csaba Osztrogonác.
720
721         * Target.pri: Added the CFURLExtras.{cpp,h} files to the projectfile.
722
723 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
724
725         PresentationAttributeCacheCleaner::m_hitCount is never initialized
726         https://bugs.webkit.org/show_bug.cgi?id=116946
727
728         Reviewed by Andreas Kling.
729
730         Merge https://chromium.googlesource.com/chromium/blink/+/70be7ddc41141ef6dec7795d37842c27dab2e194.
731
732         * dom/StyledElement.cpp:
733         (WebCore::PresentationAttributeCacheCleaner::PresentationAttributeCacheCleaner):
734
735 2013-05-29  Kent Tamura  <tkent@chromium.org>
736
737         Remove ENABLE_INPUT_MULTIPLE_FIELDS_UI.
738         https://bugs.webkit.org/show_bug.cgi?id=116796
739
740         Reviewed by Ryosuke Niwa.
741
742         This feature was used only by Chromium port.
743
744         * CMakeLists.txt:
745         * GNUmakefile.list.am:
746         * Target.pri:
747         * WebCore.vcproj/WebCore.vcproj:
748         * WebCore.vcxproj/WebCore.vcxproj:
749         * WebCore.vcxproj/WebCore.vcxproj.filters:
750         * WebCore.xcodeproj/project.pbxproj:
751         * css/html.css:
752         (input::-webkit-date-and-time-value):
753         * dom/Element.cpp:
754         * dom/Element.h:
755         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
756         * html/BaseChooserOnlyDateAndTimeInputType.h:
757         * html/BaseMultipleFieldsDateAndTimeInputType.cpp: Removed.
758         * html/BaseMultipleFieldsDateAndTimeInputType.h: Removed.
759         * html/DateInputType.cpp:
760         * html/DateInputType.h:
761         (DateInputType):
762         * html/DateTimeFieldsState.cpp: Removed.
763         * html/DateTimeFieldsState.h: Removed.
764         * html/DateTimeInputType.cpp:
765         * html/DateTimeInputType.h:
766         (DateTimeInputType):
767         * html/DateTimeLocalInputType.cpp:
768         * html/DateTimeLocalInputType.h:
769         (DateTimeLocalInputType):
770         * html/HTMLInputElement.cpp:
771         (WebCore::HTMLInputElement::HTMLInputElement):
772         (WebCore):
773         * html/HTMLInputElement.h:
774         (HTMLInputElement):
775         * html/InputType.cpp:
776         * html/InputType.h:
777         (InputType):
778         * html/MonthInputType.cpp:
779         * html/MonthInputType.h:
780         (MonthInputType):
781         * html/TimeInputType.cpp:
782         * html/TimeInputType.h:
783         (TimeInputType):
784         * html/WeekInputType.cpp:
785         * html/WeekInputType.h:
786         (WeekInputType):
787         * html/shadow/ClearButtonElement.cpp: Removed.
788         * html/shadow/ClearButtonElement.h: Removed.
789         * html/shadow/DateTimeEditElement.cpp: Removed.
790         * html/shadow/DateTimeEditElement.h: Removed.
791         * html/shadow/DateTimeFieldElement.cpp: Removed.
792         * html/shadow/DateTimeFieldElement.h: Removed.
793         * html/shadow/DateTimeFieldElements.cpp: Removed.
794         * html/shadow/DateTimeFieldElements.h: Removed.
795         * html/shadow/DateTimeNumericFieldElement.cpp: Removed.
796         * html/shadow/DateTimeNumericFieldElement.h: Removed.
797         * html/shadow/DateTimeSymbolicFieldElement.cpp: Removed.
798         * html/shadow/DateTimeSymbolicFieldElement.h: Removed.
799         * html/shadow/PickerIndicatorElement.cpp: Removed.
800         * html/shadow/PickerIndicatorElement.h: Removed.
801         * page/ChromeClient.h:
802         (ChromeClient):
803         * platform/LocalizedStrings.h:
804         (WebCore):
805         * platform/text/PlatformLocale.cpp:
806         * platform/text/PlatformLocale.h:
807         (Locale):
808         * rendering/RenderDetailsMarker.cpp:
809         * rendering/RenderDetailsMarker.h:
810         * rendering/RenderObject.h:
811         (RenderObject):
812
813 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
814
815         Remove setFullScreenRendererSize and setFullScreenRendererBackgroundColor
816         https://bugs.webkit.org/show_bug.cgi?id=116914
817
818         Reviewed by Benjamin Poulain.
819
820         Merge https://chromium.googlesource.com/chromium/blink/+/508eb21a07f69ed38b9be9ff92fe75dcb907861f
821
822         * dom/Document.cpp:
823         * dom/Document.h:
824
825 2013-05-29  Ryosuke Niwa  <rniwa@webkit.org>
826
827         Make WidgetHierarchyUpdatesSuspensionScope use swap instead of copy
828         https://bugs.webkit.org/show_bug.cgi?id=116927
829
830         Reviewed by Andreas Kling.
831
832         Merge https://chromium.googlesource.com/chromium/blink/+/1d577e1fd5c5716a06e4007e04fc3d9d0a88f5e4
833
834         This is equivalent behavior code that is unambiguously better performance. swap is O(1) time and memory,
835         copying a hash table is at least linear with the number of elements.
836
837         * rendering/RenderWidget.cpp:
838         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
839
840 2013-05-29  Andreas Kling  <akling@apple.com>
841
842         Remove Document::nodeAbsIndex() and Document::nodeWithAbsIndex().
843
844         Rubber-stamped by Antti "Lucky" Koivisto.
845
846         * dom/Document.h:
847         * dom/Document.cpp:
848
849 2013-05-28  Andreas Kling  <akling@apple.com>
850
851         FocusController should operate on Elements internally.
852         <http://webkit.org/b/116781>
853
854         Reviewed by Antti Koivisto.
855
856         Switch from Node* to Element* as much as possible inside FocusController.
857         Mostly mechanical, gets rid of some unnecessary isElementNode() checks and casts.
858
859         * page/FocusController.h:
860         * page/FocusController.cpp:
861         (WebCore::dispatchEventsOnWindowAndFocusedElement):
862         (WebCore::isNonFocusableShadowHost):
863         (WebCore::adjustedTabIndex):
864         (WebCore::shouldVisit):
865         (WebCore::FocusController::setFocused):
866         (WebCore::FocusController::findFocusableElementDescendingDownIntoFrameDocument):
867         (WebCore::FocusController::advanceFocusInDocumentOrder):
868         (WebCore::FocusController::findFocusableElementAcrossFocusScope):
869         (WebCore::FocusController::findFocusableElementRecursively):
870         (WebCore::FocusController::findFocusableElement):
871         (WebCore::FocusController::nextFocusableElement):
872         (WebCore::FocusController::previousFocusableElement):
873         (WebCore::FocusController::setActive):
874
875 2013-05-29  Radu Stavila  <stavila@adobe.com>
876
877         [CSS Regions] Mouse over an element does not trigger :hover state for parent when the element is flowed in a region
878         https://bugs.webkit.org/show_bug.cgi?id=111749
879
880         Reviewed by Antti Koivisto.
881
882         When searching for the hover ancestor and encountering a named flow thread,
883         the search will continue with the DOM ancestor of the top-most element
884         in the named flow thread.
885
886         Tests: fast/regions/hover-in-region-grandparent.html
887                fast/regions/hover-in-region-parent-skip.html
888                fast/regions/hover-in-region-parent-skip-inlines-anonymous.html
889                fast/regions/hover-on-child-in-region.html
890                fast/regions/hover-on-child-in-region-in-region.html
891
892         * rendering/RenderObject.cpp:
893         (WebCore::RenderObject::hoverAncestor):
894         * rendering/RenderObject.h:
895
896 2013-05-28  Nate Chapin  <japhet@chromium.org>
897
898         Crash in WebCore::SubresourceLoader::releaseResources when connection fails
899         https://bugs.webkit.org/show_bug.cgi?id=87743
900
901         Don't do anything complicated in SubresourceLoader::releaseResources(),
902         just clear variables. With this patch, releaseResources() will still
903         assert in debug builds if it is called twice, but it will safely execute
904         in release.
905
906         Reviewed by Darin Adler.
907
908         * loader/ResourceLoader.cpp:
909         (WebCore::ResourceLoader::cleanupForError): Pull shared cleanup code out of didFail()
910             and cancel() into a helper.
911         (WebCore::ResourceLoader::cancel): Merge a couple variables into an enum, check for
912             reentrancy from within didCancel().
913         * loader/ResourceLoader.h: Replace m_calledWillCancel and m_cancelled with an enum.
914         * loader/SubresourceLoader.cpp:
915         (WebCore::SubresourceLoader::didFinishLoading): Don't call ResourceLoader::didFinishLoading(),
916             put finish() in the middle of the process.
917         (WebCore::SubresourceLoader::didFail): Don't call ResourceLoader::didFail(), put finish()
918             in the middle of the process.
919         (WebCore::SubresourceLoader::didCancel):
920         (WebCore::SubresourceLoader::notifyDone): Do the non-trivial work previous done in releaseResources(),
921             most importantly calling loadDone().
922         (WebCore::SubresourceLoader::releaseResources): Only do simple variable clearing here.
923         * loader/SubresourceLoader.h:
924         (SubresourceLoader):
925         * loader/cache/CachedResource.cpp: Split stopLoading() into cancelLoad() (which notifies clients)
926             and clearLoader() (which just nulls m_loader).
927         * loader/cache/CachedResource.h:
928         * loader/chromium/ResourceLoaderChromium.cpp:
929
930 2013-05-28  Seokju Kwon  <seokju.kwon@gmail.com>
931
932         [GTK] Build fix after r150837
933         https://bugs.webkit.org/show_bug.cgi?id=116904
934
935         Unreviewed build fix.
936
937         * GNUmakefile.am:
938
939 2013-05-28  Andy Estes  <aestes@apple.com>
940
941         REGRESSION (r150169): Images from file: URLs display after a delay even though they were preloaded by JavaScript
942         https://bugs.webkit.org/show_bug.cgi?id=116906
943         <rdar://problem/13991927>
944
945         Reviewed by Andreas Kling.
946
947         Writing a test for this is blocked on https://webkit.org/b/116199.
948
949         Some WebKit clients use JavaScript to preload images from disk so that
950         subsequent loads will display immediately from the memory cache. By not
951         caching non-HTTP sub-resources in memory, we break this common pattern.
952         This change restricts r150169 to only apply to cached main resources.
953         Sub-resources will again be cached indefinitely as they were prior to
954         r150169.
955
956         * loader/cache/CachedResource.cpp:
957         (WebCore::CachedResource::freshnessLifetime): If this is a non-HTTP
958         main resource from a scheme that should not be cached indefinitely,
959         return 0 for the freshness lifetime. For other non-HTTP cached
960         resources, return an indefinite freshness lifetime.
961
962 2013-05-28  Dean Jackson  <dino@apple.com>
963
964         Animations do not restart after exiting page cache
965         https://bugs.webkit.org/show_bug.cgi?id=116900
966
967         Reviewed by Tim Horton.
968
969         Animations are suspended as they enter the page cache, but
970         were not getting correctly resumed when exiting. The cause
971         was an error in r149576 which was checking a global flag for suspension
972         on the AnimationController and thus not trying to resume anything.
973
974         Test: animations/resume-after-page-cache.html
975
976         * page/animation/AnimationController.cpp:
977         (WebCore::AnimationControllerPrivate::suspendAnimationsForDocument):
978         (WebCore::AnimationControllerPrivate::resumeAnimationsForDocument):
979
980 2013-05-28  Chris Rogers  <crogers@google.com>
981
982         Support multiple HRTFDatabases for different sample-rates
983         https://bugs.webkit.org/show_bug.cgi?id=116183
984
985         Reviewed by Kenneth Russell.
986
987         Adapted from Blink:
988         https://codereview.chromium.org/14636011/
989
990         This removes the limitation which required OfflineAudioContexts to be created at native sample-rate
991
992         * Modules/webaudio/AudioContext.h:
993         (WebCore::AudioContext::hrtfDatabaseLoader):
994         (AudioContext):
995         * Modules/webaudio/OfflineAudioContext.cpp:
996         (WebCore::OfflineAudioContext::create):
997         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
998         (WebCore::OfflineAudioDestinationNode::offlineRender):
999         * Modules/webaudio/PannerNode.cpp:
1000         (WebCore::PannerNode::initialize):
1001         (WebCore::PannerNode::setPanningModel):
1002         * platform/audio/HRTFDatabaseLoader.cpp:
1003         (WebCore):
1004         (WebCore::HRTFDatabaseLoader::createAndLoadAsynchronouslyIfNecessary):
1005         (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader):
1006         * platform/audio/HRTFDatabaseLoader.h:
1007         (HRTFDatabaseLoader):
1008         (WebCore::HRTFDatabaseLoader::loaderMap):
1009         * platform/audio/HRTFPanner.cpp:
1010         (WebCore::HRTFPanner::HRTFPanner):
1011         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
1012         (WebCore::HRTFPanner::pan):
1013         * platform/audio/HRTFPanner.h:
1014         (HRTFPanner):
1015         * platform/audio/Panner.cpp:
1016         (WebCore::Panner::create):
1017         * platform/audio/Panner.h:
1018         (WebCore):
1019
1020 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
1021
1022         Windows build fix.
1023
1024         * platform/cf/KURLCFNet.cpp:
1025         (WebCore::KURL::createCFURL):
1026
1027 2013-05-28  Alexey Proskuryakov  <ap@apple.com>
1028
1029         Freeze when loading a particular page on washingtonpost.com with NetworkProcess enabled
1030         https://bugs.webkit.org/show_bug.cgi?id=116887
1031         <rdar://problem/12965959>
1032
1033         Reviewed by Darin Adler.
1034
1035         Test: http/tests/uri/curly-braces-escaping.html
1036
1037         The issue was that WebKit used an incorrect accessor to get a string out of CFURL,
1038         unlike WebCore.
1039
1040         Centralized code for converting between CFURLs and strings in a place that WebKit
1041         can use directly.
1042
1043         * WebCore.exp.in:
1044         * WebCore.vcproj/WebCore.vcproj:
1045         * WebCore.vcxproj/WebCore.vcxproj:
1046         * WebCore.vcxproj/WebCore.vcxproj.filters:
1047         * WebCore.xcodeproj/project.pbxproj:
1048         Keeping things building.
1049
1050         * platform/KURL.cpp: (WebCore::KURL::copyToBuffer):
1051         * platform/KURL.h:
1052         Updated for a new typedef name. The code was using Vector<char, 512> and CharBuffer
1053         inconsistently, and now URLs use URLCharBuffer.
1054
1055         * platform/cf/CFURLExtras.cpp: Added.
1056         (WebCore::createCFURLFromBuffer):
1057         (WebCore::getURLBytes):
1058         * platform/cf/CFURLExtras.h: Added.
1059         * platform/cf/KURLCFNet.cpp:
1060         (WebCore::KURL::KURL):
1061         (WebCore::KURL::createCFURL):
1062         Extracted code for CFURL string manipulation that is not logcally part of KURL.
1063
1064         * platform/mac/KURLMac.mm:
1065         (WebCore::KURL::KURL): Use the new getURLBytes function.
1066         (WebCore::KURL::operator NSURL *): Added a comment.
1067         (WebCore::KURL::createCFURL): Added a comment, and updated for new names and
1068         signatures.
1069
1070         * platform/network/cf/ResourceErrorCF.cpp: (WebCore::ResourceError::platformLazyInit):
1071         Added a FIXME. We are still using CFURLGetString here. The difficulty is getting
1072         encodings right.
1073
1074 2013-05-28  Anders Carlsson  <andersca@apple.com>
1075
1076         Create a html/forms subdirectory and move FileIconLoader there
1077         https://bugs.webkit.org/show_bug.cgi?id=116880
1078
1079         Reviewed by Jessie Berlin.
1080
1081         A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
1082         them out into a separate subdirectory, html/forms.
1083
1084         Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
1085         the file upload element), and is not really a platform abstraction so it doesn't belong in platform.
1086
1087         * CMakeLists.txt:
1088         * GNUmakefile.list.am:
1089         * Target.pri:
1090         * WebCore.vcproj/WebCore.vcproj:
1091         * WebCore.vcxproj/WebCore.vcxproj:
1092         * WebCore.vcxproj/WebCore.vcxproj.filters:
1093         * WebCore.xcodeproj/project.pbxproj:
1094         * html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
1095         * html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.
1096
1097 2013-05-28  Chris Fleizach  <cfleizach@apple.com>
1098
1099         AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
1100         https://bugs.webkit.org/show_bug.cgi?id=116756
1101
1102         Reviewed by Tim Horton.
1103
1104         If AXFocused is set to true, but the WebView is not the first responder, then the call will
1105         not do anything. This change asks the Chrome to make the WebView the first responder before
1106         trying to set focus within the page.
1107
1108         Was not able to make a test, it requires on interplay between areas outside the web view.
1109
1110         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1111         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1112
1113 2013-05-28  Jer Noble  <jer.noble@apple.com>
1114
1115         Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
1116         https://bugs.webkit.org/show_bug.cgi?id=116882
1117
1118         Reviewed by Eric Carlson.
1119
1120         Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.
1121
1122         * rendering/RenderTextTrackCue.cpp:
1123         (WebCore::RenderTextTrackCue::repositionGenericCue):
1124
1125 2013-05-28  Alberto Garcia  <agarcia@igalia.com>
1126
1127         [BlackBerry] GraphicsContext: add missing definitions.
1128         https://bugs.webkit.org/show_bug.cgi?id=115515
1129
1130         Reviewed by Rob Buis.
1131
1132         * platform/graphics/GraphicsContext.h:
1133         (Graphics):
1134         Add definition for PlatformGraphicsContext.
1135         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1136         Include RoundedRect.h
1137
1138 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
1139
1140         [BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
1141         https://bugs.webkit.org/show_bug.cgi?id=116604
1142
1143         Reviewed by Carlos Garcia Campos.
1144
1145         PR 273550, 99638
1146
1147         Remove the "get" prefix from getters in the WebKit- and compositing-
1148         thread layer classes, as well as LayerRendererSurface. Clarify which
1149         geometry-related getters return normalized device coordinates by adding
1150         a comment.
1151
1152         Also remove dead code related to LayerData::m_holePunchClipRect, which
1153         was part of an eventually disabled fix for video clipping in iframes,
1154         PR 99638. Since we now use AC layers for iframes, the bug is no longer
1155         reproducible, and the dead code will never need to be enabled again.
1156
1157         No change in behavior, no new tests.
1158
1159         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
1160         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
1161         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1162         (WebCore::LayerCompositingThread::setDrawTransform):
1163         (WebCore::LayerCompositingThread::transformedHolePunchRect):
1164         (WebCore::LayerCompositingThread::drawTextures):
1165         (WebCore::LayerCompositingThread::drawSurface):
1166         * platform/graphics/blackberry/LayerCompositingThread.h:
1167         (WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
1168         (LayerCompositingThread):
1169         (WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
1170         (WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
1171         (WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
1172         * platform/graphics/blackberry/LayerData.h:
1173         (LayerData): Removed unused data member "m_holePunchClipRect"
1174         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1175         (WebCore::LayerFilterRenderer::applyActions):
1176         * platform/graphics/blackberry/LayerRenderer.cpp:
1177         (WebCore::LayerRenderer::compositeLayers):
1178         (WebCore::LayerRenderer::drawDebugBorder):
1179         (WebCore::LayerRenderer::drawHolePunchRect):
1180         (WebCore::LayerRenderer::prepareFrameRecursive):
1181         (WebCore::LayerRenderer::updateLayersRecursive):
1182         (WebCore::collect3DPreservingLayers):
1183         (WebCore::LayerRenderer::compositeLayersRecursive):
1184         * platform/graphics/blackberry/LayerRendererSurface.cpp:
1185         (WebCore::LayerRendererSurface::boundingBox):
1186         * platform/graphics/blackberry/LayerRendererSurface.h:
1187         (WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
1188         * platform/graphics/blackberry/LayerWebKitThread.h:
1189         (WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
1190         * platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
1191         (WebCore::VideoLayerWebKitThread::setHolePunchRect):
1192         (WebCore::VideoLayerWebKitThread::boundsChanged):
1193
1194 2013-05-28  Jer Noble  <jer.noble@apple.com>
1195
1196         Made AudioNode an EventTarget
1197         https://bugs.webkit.org/show_bug.cgi?id=116871
1198
1199         Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b
1200
1201         Reviewed by Darin Adler.
1202
1203         Tests: webaudio/audionode-expected.txt:
1204                webaudio/audionode.html:
1205
1206         Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
1207         all that same boilerplate from ScriptProcessorNode now that it's base class
1208         is an EventTarget.
1209
1210         * Modules/webaudio/AudioNode.cpp:
1211         (WebCore::AudioNode::interfaceName): Added boilerplate.
1212         (WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
1213         (WebCore::AudioNode::processIfNecessary): Whitespace.
1214         * Modules/webaudio/AudioNode.h:
1215         * Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
1216         * Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
1217         * Modules/webaudio/ScriptProcessorNode.h: Ditto.
1218         * Modules/webaudio/ScriptProcessorNode.idl: Ditto.
1219         * dom/EventTarget.h: Mark AudioNode as an EventTarget.
1220         * dom/EventTargetFactory.in: Ditto.
1221
1222 2013-05-28  Arvid Nilsson  <anilsson@rim.com>
1223
1224         [BlackBerry] backface-visibility: hidden doesn't work properly with masks and filters
1225         https://bugs.webkit.org/show_bug.cgi?id=116616
1226
1227         Reviewed by Carlos Garcia Campos.
1228
1229         The BlackBerry::Platform::Graphics::GraphicsContext generates geometry
1230         with a different winding order than the accelerated compositing backend
1231         of the BlackBerry port. So, when we switched from Skia to this new
1232         rendering engine, we switched from glFrontFace(GL_CCW) to
1233         glFrontFace(GL_CW), and all was well when drawing display lists.
1234         However, we forgot to update the winding order of geometry generated
1235         within the accelerated compositing backend, which is used for masks and
1236         filters, so they were getting erroneously culled out when
1237         backface-visibility: hidden was applied to them. Fixed by switching the
1238         winding order of all geometry generated up here, which has the added
1239         benefit of enabling us to use TransformationMatrix::mapQuad instead of
1240         transforming point-by-point.
1241
1242         To further complicate matters, a right-side up transform is used when
1243         drawing layers into surfaces, reversing the winding order and requiring
1244         us to switch back to glFrontFace(GL_CCW) temporarily, when drawing
1245         layers to surfaces, or the layers will get culled out inside the
1246         surface.
1247
1248         Also fix spelling error, "drawed" should be "drawn".
1249
1250         No new tests, this is only detectable by pixel tests, which the
1251         BlackBerry port currently doesn't support.
1252
1253         PR 341945.
1254
1255         * platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
1256         (WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
1257         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1258         (WebCore::LayerCompositingThread::setDrawTransform):
1259         (WebCore::getTransformedRect):
1260         (WebCore::LayerCompositingThread::drawTextures):
1261         (WebCore::LayerCompositingThread::drawSurface):
1262         * platform/graphics/blackberry/LayerCompositingThread.h:
1263         (LayerCompositingThread):
1264         (WebCore::LayerCompositingThread::origin):
1265         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1266         (WebCore):
1267         * platform/graphics/blackberry/LayerRenderer.cpp:
1268         (WebCore::LayerRenderer::compositeLayers):
1269         (WebCore):
1270         (WebCore::LayerRenderer::drawLayersOnSurfaces):
1271         * platform/graphics/blackberry/LayerRendererSurface.cpp:
1272         (WebCore::LayerRendererSurface::drawRect):
1273         (WebCore::LayerRendererSurface::transformedBounds):
1274         * platform/graphics/blackberry/LayerRendererSurface.h:
1275         (WebCore::LayerRendererSurface::origin):
1276         (LayerRendererSurface):
1277         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1278         (WebCore):
1279         (WebCore::loadBufferingImageData):
1280         (WebCore::MediaPlayerPrivate::drawBufferingAnimation):
1281
1282 2013-05-28  Andreas Kling  <akling@apple.com>
1283
1284         Move Node::dispatchChangeEvent() to HTMLFormControlElement.
1285         <http://webkit.org/b/116866>
1286
1287         Reviewed by Anders Carlsson.
1288
1289         ...and devirtualize it, since it had no overrides.
1290
1291         * dom/Node.h:
1292         * dom/Node.cpp:
1293         * html/HTMLFormControlElement.h:
1294         * html/HTMLFormControlElement.cpp:
1295         (WebCore::HTMLFormControlElement::dispatchChangeEvent):
1296         (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
1297         * html/FileInputType.cpp:
1298         (WebCore::FileInputType::setFiles):
1299         * html/HTMLTextFormControlElement.cpp:
1300         (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
1301
1302 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
1303
1304         Refactoring CSS grammar
1305         https://bugs.webkit.org/show_bug.cgi?id=116679
1306
1307         Reviewed by Andreas Kling.
1308
1309         From Blink r149948 by <serya@chromium.org>
1310
1311         Added "closing_parenthesis:" and "error_recovery:" to avoid code
1312         duplication in a couple of error recovery rules. Some other rules
1313         were also refactored which allows to reduce the the number of
1314         shift/reduce conflicts by 2.
1315
1316         No new tests required as this is just a refactoring, no new
1317         functionality added.
1318
1319         * css/CSSGrammar.y.in:
1320
1321 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
1322
1323         Invalid block doesn't make declaration invalid
1324         https://bugs.webkit.org/show_bug.cgi?id=115709
1325
1326         Reviewed by Andreas Kling.
1327
1328         From Blink r149446 by <serya@chromium.org>
1329
1330         Added a new rule "declaration_recovery:" which covers any kind of
1331         "invalid_block_list maybe_space" sequence. By appending this new
1332         rule to every rule reductable to "declaration:" we can remove some
1333         redundant rules and improve error recovery of some others that
1334         were only accepting exactly one error.
1335
1336         One of the rules being removed was preventing invalid blocks in a
1337         declaration to invalidate the whole declaration. The rule was
1338         reporting the syntax error but at the same time accepting the
1339         invalid block as part of a valid declaration.
1340
1341         * css/CSSGrammar.y.in:
1342
1343 2013-05-28  Andreas Kling  <akling@apple.com>
1344
1345         Move dispatching of focus-related events from Node to Element.
1346         <http://webkit.org/b/116864>
1347
1348         Reviewed by Antti Koivisto.
1349
1350         ...and pass around pointers to Element instead of Node.
1351
1352         * dom/Node.cpp:
1353         * dom/Node.h:
1354         * dom/Element.h:
1355         * dom/Element.cpp:
1356         (WebCore::Element::dispatchFocusInEvent):
1357         (WebCore::Element::dispatchFocusOutEvent):
1358         (WebCore::Element::dispatchFocusEvent):
1359         (WebCore::Element::dispatchBlurEvent):
1360
1361             Moved here from Node.
1362
1363         * html/HTMLFormControlElement.h:
1364         * html/HTMLFormControlElement.cpp:
1365         (WebCore::HTMLFormControlElement::dispatchBlurEvent):
1366         * html/HTMLSelectElement.h:
1367         * html/HTMLSelectElement.cpp:
1368         (WebCore::HTMLSelectElement::dispatchFocusEvent):
1369         (WebCore::HTMLSelectElement::dispatchBlurEvent):
1370         * html/HTMLTextFormControlElement.h:
1371         * html/HTMLTextFormControlElement.cpp:
1372         (WebCore::HTMLTextFormControlElement::dispatchFocusEvent):
1373         (WebCore::HTMLTextFormControlElement::dispatchBlurEvent):
1374
1375             Update subclass overrides and sprinkle OVERRIDE/FINAL.
1376
1377 2013-05-28  Zan Dobersek  <zdobersek@igalia.com>
1378
1379         Remove CachedResourceRequest::initiatorElement
1380         https://bugs.webkit.org/show_bug.cgi?id=116862
1381
1382         Reviewed by Andreas Kling.
1383
1384         The CachedResourceRequest::initiatorElement method is not used anywhere and should be removed.
1385
1386         * loader/cache/CachedResourceRequest.cpp: Remove the initiatorElement method definition.
1387         * loader/cache/CachedResourceRequest.h:
1388         (CachedResourceRequest): Remove the initiatorElement method declaration.
1389
1390 2013-05-28  Andreas Kling  <akling@apple.com>
1391
1392         Document::setFocusedNode() should be setFocusedElement().
1393         <http://webkit.org/b/116857>
1394
1395         Reviewed by Antti Koivisto.
1396
1397         Only Elements can be focused, so tighten Document's idea of what's focused.
1398
1399         Most of this patch is just updating call sites for the new names and removing
1400         now-unnecessary isElementNode() checks and casts.
1401
1402         * WebCore.exp.in:
1403         * accessibility/AXObjectCache.cpp:
1404         (WebCore::AXObjectCache::focusedUIElementForPage):
1405         * accessibility/AccessibilityNodeObject.cpp:
1406         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
1407         * accessibility/AccessibilityRenderObject.cpp:
1408         (WebCore::AccessibilityRenderObject::isFocused):
1409         (WebCore::AccessibilityRenderObject::setFocused):
1410         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
1411         * bindings/objc/DOM.mm:
1412         (-[DOMElement isFocused]):
1413         * dom/Document.cpp:
1414         (WebCore::Document::dispose):
1415         (WebCore::Document::detach):
1416         (WebCore::Document::focusedNodeRemoved):
1417         (WebCore::Document::removeFocusedNodeOfSubtree):
1418         (WebCore::Document::setFocusedElement):
1419         (WebCore::Document::updateFocusAppearanceTimerFired):
1420         (WebCore::eventTargetNodeForDocument):
1421         * dom/Document.h:
1422         (Document):
1423         (WebCore::Document::focusedElement):
1424         * dom/Element.cpp:
1425         (WebCore::Element::attach):
1426         (WebCore::Element::focus):
1427         (WebCore::Element::blur):
1428         (WebCore::Element::cancelFocusAppearanceUpdate):
1429         * dom/Node.cpp:
1430         (WebCore::Node::rendererIsEditable):
1431         * dom/TreeScope.cpp:
1432         (WebCore::TreeScope::focusedElement):
1433         * dom/UserTypingGestureIndicator.cpp:
1434         (WebCore::UserTypingGestureIndicator::UserTypingGestureIndicator):
1435         * editing/Editor.cpp:
1436         (WebCore::Editor::setBaseWritingDirection):
1437         (WebCore::Editor::setComposition):
1438         (WebCore::Editor::guessesForMisspelledOrUngrammatical):
1439         * editing/EditorCommand.cpp:
1440         (WebCore::verticalScrollDistance):
1441         * editing/FrameSelection.cpp:
1442         (WebCore::FrameSelection::selectAll):
1443         (WebCore::FrameSelection::focusedOrActiveStateChanged):
1444         (WebCore::FrameSelection::setFocusedElementIfNeeded):
1445         (WebCore::FrameSelection::currentForm):
1446         * history/CachedPage.cpp:
1447         (WebCore::CachedPage::restore):
1448         * html/HTMLInputElement.cpp:
1449         (WebCore::HTMLInputElement::updateType):
1450         (WebCore::HTMLInputElement::attach):
1451         * html/HTMLTextAreaElement.cpp:
1452         (WebCore::HTMLTextAreaElement::setValueCommon):
1453         * html/HTMLTextFormControlElement.cpp:
1454         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
1455         (WebCore::HTMLTextFormControlElement::selectionStart):
1456         (WebCore::HTMLTextFormControlElement::selectionEnd):
1457         (WebCore::HTMLTextFormControlElement::selectionDirection):
1458         * html/RadioInputType.cpp:
1459         (WebCore::RadioInputType::handleKeydownEvent):
1460         (WebCore::RadioInputType::isKeyboardFocusable):
1461         * html/shadow/DateTimeEditElement.cpp:
1462         (WebCore::DateTimeEditElement::focusedFieldIndex):
1463         * loader/FrameLoader.cpp:
1464         (WebCore::FrameLoader::stopLoading):
1465         * page/DOMWindow.cpp:
1466         (WebCore::DOMWindow::focus):
1467         * page/EventHandler.cpp:
1468         (WebCore::EventHandler::scrollOverflow):
1469         (WebCore::EventHandler::logicalScrollOverflow):
1470         (WebCore::EventHandler::dispatchMouseEvent):
1471         (WebCore::EventHandler::sendContextMenuEventForKey):
1472         (WebCore::EventHandler::capsLockStateMayHaveChanged):
1473         * page/FocusController.cpp:
1474         (WebCore::dispatchEventsOnWindowAndFocusedNode):
1475         (WebCore::FocusController::advanceFocusInDocumentOrder):
1476         (WebCore::FocusController::setFocusedElement):
1477         (WebCore::FocusController::findFocusCandidateInContainer):
1478         (WebCore::FocusController::advanceFocusDirectionallyInContainer):
1479         (WebCore::FocusController::advanceFocusDirectionally):
1480         * page/FrameView.cpp:
1481         (WebCore::FrameView::scrollToAnchor):
1482         * plugins/PluginView.cpp:
1483         (WebCore::PluginView::focusPluginElement):
1484         * plugins/efl/PluginViewEfl.cpp:
1485         (WebCore::PluginView::setFocus):
1486         * plugins/mac/PluginViewMac.mm:
1487         (WebCore::PluginView::platformStart):
1488         * rendering/RenderImage.cpp:
1489         (WebCore::RenderImage::paintAreaElementFocusRing):
1490         * rendering/RenderListBox.cpp:
1491         (WebCore::RenderListBox::paintItemForeground):
1492         (WebCore::RenderListBox::paintItemBackground):
1493         * rendering/RenderTextControlSingleLine.cpp:
1494         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
1495         (WebCore::RenderTextControlSingleLine::textShouldBeTruncated):
1496         * rendering/RenderTheme.cpp:
1497         (WebCore::RenderTheme::isFocused):
1498
1499 2013-05-28  Sergio Villar Senin  <svillar@igalia.com>
1500
1501         Web Inspector: Enable CSS logging
1502         https://bugs.webkit.org/show_bug.cgi?id=113401
1503
1504         Reviewed by Benjamin Poulain.
1505
1506         From Blink r149265 by <serya@chromium.org>
1507
1508         CSS logging was disabled in r147028 to prevent message overflow in
1509         the inspector console. This change restores it by modifying the
1510         CSS grammar in order to reduce as much consecutive errors as
1511         possible in 'declaration_list' and 'decl_list' rules.
1512
1513         This way, for rules like 'x { color: ### }' only the first '#'
1514         will be reported as error (instead of 3 identical errors).
1515
1516         The rule 'declaration' still produces multiple errors, because it
1517         does not eat as much errors as possible. So in order not to create
1518         a complex risky patch we just disable logging in the parser for
1519         that rule.
1520
1521         * css/CSSGrammar.y.in:
1522         * css/CSSParser.cpp:
1523         (WebCore::CSSParser::CSSParser):
1524         (WebCore::CSSParser::parseSheet):
1525         (WebCore::CSSParser::syntaxError):
1526         (WebCore::CSSParser::isLoggingErrors):
1527         (WebCore::CSSParser::rewriteSpecifiers):
1528         * css/CSSParser.h:
1529         (CSSParser):
1530
1531 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
1532
1533         Build fix for WinCE after r150730.
1534
1535         * platform/graphics/FontFallbackList.cpp:
1536         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1537
1538 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
1539
1540         Build fix for WinCE after r150772.
1541
1542         * platform/win/ClipboardWin.cpp:
1543         (WebCore):
1544         * platform/win/PasteboardWin.cpp:
1545         (WebCore::Pasteboard::readFilenames):
1546         (WebCore):
1547
1548 2013-05-27  Darin Adler  <darin@apple.com>
1549
1550         Fix build.
1551
1552         * html/HTMLAnchorElement.cpp:
1553         (WebCore::hasNonEmptyBox): Fix typo.
1554
1555 2013-05-27  Darin Adler  <darin@apple.com>
1556
1557         Move hasNonEmptyBoundingBox from Node to HTMLAnchorElement
1558         https://bugs.webkit.org/show_bug.cgi?id=116842
1559
1560         Reviewed by Antti Koivisto.
1561
1562         * dom/Node.cpp: Removed hasNonEmptyBoundingBox.
1563         * dom/Node.h: Ditto.
1564
1565         * html/HTMLAnchorElement.cpp:
1566         (WebCore::HTMLAnchorElement::isMouseFocusable): Fixed #if to be more readable and
1567         added more-explicit clearer comments. No behavior change.
1568         (WebCore::hasNonEmptyBox): Added.  Has the same code that was in
1569         Node::hasNonEmptyBoundingBox with some additional comments.
1570         (WebCore::HTMLAnchorElement::isKeyboardFocusable): Call hasNonEmptyBox.
1571
1572 2013-05-27  Darin Adler  <darin@apple.com>
1573
1574         Move isBlockFlowElement and related functions out of the Node class into editing code
1575         https://bugs.webkit.org/show_bug.cgi?id=116846
1576
1577         Reviewed by Antti Koivisto.
1578
1579         * dom/Node.cpp: Removed isBlockFlowElement, enclosingBlockFlowElement, and
1580         inSameContainingBlockFlowElement. These are all editing functions that don't
1581         belong in the Node class, and mostly-deprecated ones to boot.
1582         * dom/Node.h: Ditto.
1583
1584         * dom/Position.cpp:
1585         (WebCore::inSameEnclosingBlockFlowElement): Added. This editing-specific function
1586         is used only here, so put it here.
1587         (WebCore::Position::rendersInDifferentPosition): Updated to call new function above.
1588         (WebCore::Position::leadingWhitespacePosition): Ditto.
1589
1590         * editing/InsertLineBreakCommand.cpp:
1591         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use
1592         deprecatedEnclosingBlockFlowElement at its new location.
1593         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
1594
1595         * editing/InsertListCommand.cpp:
1596         (WebCore::InsertListCommand::doApplyForSingleParagraph): use
1597         isBlockFlowElement at its new location.
1598         * editing/ReplaceSelectionCommand.cpp:
1599         (WebCore::enclosingInline): Ditto.
1600
1601         * editing/VisiblePosition.cpp:
1602         (WebCore::VisiblePosition::canonicalPosition): Use deprecatedEnclosingBlockFlowElement
1603         at its new location.
1604         (WebCore::enclosingBlockFlowElement): Ditto. Also added FIXME.
1605         * editing/VisibleSelection.cpp:
1606         (WebCore::makeSearchRange): Ditto.
1607
1608         * editing/htmlediting.cpp:
1609         (WebCore::isBlockFlowElement): Added. Same as the Node::isBlockFlowElement
1610         function, but here because this is an editing function, not suitable as a Node member.
1611         (WebCore::deprecatedEnclosingBlockFlowElement): Ditto. Added "deprecated" to the name
1612         since the Node member function had a comment saying it was deprecated. Also changed so
1613         it tolerates a 0 for an argument, which made it easier for one caller.
1614
1615         * editing/htmlediting.h: Added the two new functions.
1616
1617 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
1618
1619         Add guard around paintForFixedRootBackground
1620         https://bugs.webkit.org/show_bug.cgi?id=116754
1621
1622         Reviewed by Simon Fraser.
1623
1624         paintForFixedRootBackground is only used when ACCELERATED_COMPOSITING is enabled.
1625
1626         No new tests, no behavior change.
1627
1628         * rendering/RenderLayer.cpp:
1629         (WebCore):
1630
1631 2013-05-27  Seokju Kwon  <seokju.kwon@gmail.com>
1632
1633         Remove a leftover Pagepoup from PickerIndicatorElement.h
1634         https://bugs.webkit.org/show_bug.cgi?id=116801
1635
1636         Reviewed by Anders Carlsson.
1637
1638         No new tests, no behavior change.
1639
1640         * html/shadow/PickerIndicatorElement.h:
1641         (WebCore):
1642
1643 2013-05-27  Claudio Saavedra  <csaavedra@igalia.com>
1644
1645         [CSS] -webkit-var prefix is case-sensitive
1646         https://bugs.webkit.org/show_bug.cgi?id=116829
1647
1648         Reviewed by Darin Adler.
1649
1650         Tests: Added case to fast/css/variables/case-sensitive.html
1651
1652         * css/CSSParser.cpp:
1653         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Add variant to
1654         IsEqualToCSSIdentifier that respects case-sensitivity.
1655         (WebCore::CSSParser::realLex): Use the above method for CSS
1656         variable declarations.
1657
1658 2013-05-27  Zalan Bujtas  <zalan@apple.com>
1659
1660         drop-shadow filter with overflow:hidden child misbehaves.
1661         https://bugs.webkit.org/show_bug.cgi?id=109783
1662
1663         Reviewed by Simon Fraser.
1664
1665         Applying CSS filters only to the scrollbar rect leaves rendering
1666         artefacts. Filters should skip such partial repaints.
1667
1668         Tests: Test framework uses mock theme for scrollbars. Such scrollbars do not
1669         initiate partial repaints.
1670
1671         * rendering/RenderLayer.cpp:
1672         (WebCore::RenderLayer::setupFilters):
1673         (WebCore::RenderLayer::paintLayerContents):
1674         * rendering/RenderLayer.h:
1675         (RenderLayer):
1676
1677 2013-05-27  Xueqing Huang  <huangxueqing@baidu.com>
1678
1679         Move Windows port off legacy clipboard.
1680         https://bugs.webkit.org/show_bug.cgi?id=116258
1681
1682         Reviewed by Darin Adler.
1683
1684         Clipboard refactor, no new tests.
1685
1686         * dom/Clipboard.h:
1687         * page/win/EventHandlerWin.cpp:
1688         (WebCore::EventHandler::createDraggingClipboard): Create Clipboard instead of ClipboardWin.
1689         * platform/Pasteboard.h:
1690         (WebCore::Pasteboard::dataObject): Get IDataObject by Clipborad.
1691         (WebCore::Pasteboard::writableDataObject): Get WCDataObject by Clipborad.
1692         * platform/win/ClipboardWin.cpp:
1693         (WebCore::Clipboard::createDragImage): Change parameter name loc to dragLocation.
1694         (WebCore::Clipboard::declareAndWriteDragImage): Implement declareAndWriteDragImage use WCDataObject exposed by Pasteboard.
1695         * platform/win/ClipboardWin.h: Removed.
1696         * platform/win/EditorWin.cpp:
1697         (WebCore::Editor::newGeneralClipboard): Create Clipboard instead of ClipboardWin.
1698         * platform/win/PasteboardWin.cpp:
1699         (WebCore::Pasteboard::createForCopyAndPaste): Create a Pasteboard.
1700         (WebCore::Pasteboard::createPrivate): Ditto.
1701         (WebCore::Pasteboard::createForDragAndDrop): Ditto.
1702         (WebCore::Pasteboard::finishCreatingPasteboard): Create Pasteboard use Windows API.
1703         (WebCore::Pasteboard::Pasteboard):
1704         (WebCore::clipboardTypeFromMIMEType): Copied from ClipboardWin.cpp.
1705         (WebCore::Pasteboard::clear): Ditto.
1706         (WebCore::Pasteboard::hasData): Ditto.
1707         (WebCore::addMimeTypesForFormat): Ditto.
1708         (WebCore::Pasteboard::types): Ditto.
1709         (WebCore::Pasteboard::readString): Ditto.
1710         (WebCore::Pasteboard::readFilenames): Ditto.
1711         (WebCore::writeURL): Ditto.
1712         (WebCore::Pasteboard::writeString): Ditto.
1713         (WebCore::Pasteboard::setDragImage): Ditto.
1714         (WebCore::Pasteboard::writeRangeToDataObject): Write range to WCDataObject.
1715         (WebCore::Pasteboard::writeSelection):
1716         (WebCore::Pasteboard::writePlainTextToDataObject): Write PlainText to WCDataObject.
1717         (WebCore::Pasteboard::writePlainText):
1718         (WebCore::pathRemoveBadFSCharacters): Copied from ClipboardWin.cpp.
1719         (WebCore::filesystemPathFromUrlOrTitle): Ditto.
1720         (WebCore::writeFileToDataObject): Ditto.
1721         (WebCore::Pasteboard::writeURLToDataObject): Write URL to WCDataObject.
1722         (WebCore::Pasteboard::writeURL): Copied from ClipboardWin.cpp.
1723         (WebCore::Pasteboard::writePasteboard): Copied from Pasteboard::writeClipboard.
1724         (WebCore::Pasteboard::documentFragment): Copied from ClipboardWin.cpp.
1725         (WebCore::Pasteboard::setExternalDataObject): Clipboard can set new IDataObject.
1726         (WebCore::getCachedImage): Copied from ClipboardWin.cpp.
1727         (WebCore::createGlobalImageFileDescriptor): Ditto.
1728         (WebCore::createGlobalImageFileContent): Ditto.
1729         (WebCore::createGlobalHDropContent): Ditto.
1730         (WebCore::Pasteboard::writeImageToDataObject): Expose to make Clipboard implement declareAndWriteDragImage.
1731         (WebCore::Pasteboard::writeURLToWritableDataObject): Ditto.
1732
1733 2013-05-27  Tim Horton  <timothy_horton@apple.com>
1734
1735         PDFPlugin: Main-frame PDFPlugin Accessibility
1736         https://bugs.webkit.org/show_bug.cgi?id=116563
1737         <rdar://problem/13458534>
1738
1739         Reviewed by Sam Weinig.
1740
1741         * WebCore.exp.in: Export AffineTransform::mapRect.
1742
1743 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
1744
1745         Checkbox UX update.
1746         https://bugs.webkit.org/show_bug.cgi?id=116838.
1747
1748         Reviewed by Rob Buis.
1749
1750         BlackBerry PR 342302.
1751         Internally Reviewed by Jeff Rogers.
1752         Remove old background and change pressed checkmark image.
1753
1754         * platform/blackberry/RenderThemeBlackBerry.cpp:
1755         (WebCore::RenderThemeBlackBerry::paintCheckbox):
1756
1757 2013-05-27  Sam Weinig  <sam@webkit.org>
1758
1759         When the background is completely transparent we should be conservative and use the default scrollbar style, not the light one
1760         https://bugs.webkit.org/show_bug.cgi?id=116836
1761         <rdar://problem/13949905>
1762
1763         Reviewed by Simon Fraser.
1764
1765         * page/FrameView.cpp:
1766         (WebCore::FrameView::recalculateScrollbarOverlayStyle):
1767         Don't use the light style when the background is completely transparent.
1768
1769 2013-05-27  Patrick Gansterer  <paroga@webkit.org>
1770
1771         Use ICU_INCLUDE_DIRS in BlackBerry CMake files
1772         https://bugs.webkit.org/show_bug.cgi?id=116210
1773
1774         Reviewed by Rob Buis.
1775
1776         Set and use the ICU_INCLUDE_DIRS variable to avoid
1777         duplicated adding of the ICU include directory.
1778
1779         * PlatformBlackBerry.cmake:
1780
1781 2013-05-27  Antti Koivisto  <antti@apple.com>
1782
1783         Tighten FontGlyphs::glyphDataAndPageForCharacter to take FontDescription
1784         https://bugs.webkit.org/show_bug.cgi?id=116823
1785
1786         Reviewed by Andreas Kling.
1787
1788         FontGlyphs does not need to know about Font anymore.
1789
1790         * platform/graphics/Font.cpp:
1791         (WebCore::Font::Font):
1792         (WebCore::Font::operator=):
1793         * platform/graphics/Font.h:
1794         (WebCore::Font::isPlatformFont):
1795         (WebCore::Font::glyphDataAndPageForCharacter):
1796         (Font):
1797         * platform/graphics/FontCache.h:
1798         * platform/graphics/FontFallbackList.cpp:
1799         (WebCore::FontGlyphs::FontGlyphs):
1800         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1801         * platform/graphics/FontFallbackList.h:
1802         (WebCore):
1803         (WebCore::FontGlyphs::createForPlatformFont):
1804         
1805             Tweaked the name.
1806
1807         (WebCore::FontGlyphs::isForPlatformFont):
1808         
1809             Move knowledge about platform font to FontGlyphs as it is needed for resolving system fallback on Mac.
1810
1811         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1812         (WebCore::FontCache::systemFallbackForCharacters):
1813         * platform/graphics/freetype/FontCacheFreeType.cpp:
1814         (WebCore::FontCache::systemFallbackForCharacters):
1815         * platform/graphics/mac/FontCacheMac.mm:
1816         (WebCore::FontCache::systemFallbackForCharacters):
1817         * platform/graphics/qt/FontCacheQt.cpp:
1818         (WebCore::FontCache::systemFallbackForCharacters):
1819         * platform/graphics/win/FontCacheWin.cpp:
1820         (WebCore::FontCache::systemFallbackForCharacters):
1821         * platform/graphics/wince/FontCacheWinCE.cpp:
1822         (WebCore::FontCache::systemFallbackForCharacters):
1823         
1824             More descriptive name and tighter interface.
1825
1826 2013-05-27  Mihnea Ovidenie  <mihnea@adobe.com>
1827
1828         [CSSRegions] Prevent unnecessary copy of LayoutRect objects
1829         https://bugs.webkit.org/show_bug.cgi?id=116828
1830
1831         Reviewed by Andreas Kling.
1832
1833         Use const references for parameter passing.
1834         No functional change, no new tests.
1835
1836         * rendering/RenderFlowThread.cpp:
1837         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
1838         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
1839         * rendering/RenderFlowThread.h:
1840         * rendering/RenderRegion.cpp:
1841         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1842         * rendering/RenderRegion.h:
1843
1844 2013-05-27  Leo Yang  <leoyang@rim.com>
1845
1846         [BlackBerry] Reveal HTTP error code for XHR even if there is no response body
1847         https://bugs.webkit.org/show_bug.cgi?id=116543
1848
1849         Reviewed by Rob Buis.
1850         Reviewed internally by Joe Mason.
1851
1852         It's a regression introduced by r132556.
1853         BlackBerry is doing friendly HTTP error handling: if there is no response body
1854         for an HTTP error it will display an error message made by the port. But for a
1855         XHR request, which usually does not result in displaying error messages to the
1856         end user, HTTP error code should be revealed to let the JavaScript know what
1857         the actual server error code is.
1858
1859         Covered by existing tests:
1860         ManualTests/blackberry/head-xhr-nonexistant-file.html
1861         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-head-readystate-for-404.html
1862         LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-check-get-readystate-for-404-without-body.html
1863
1864         * platform/network/blackberry/NetworkJob.cpp:
1865         (WebCore::NetworkJob::shouldNotifyClientFailed):
1866
1867 2013-05-27  Tiancheng Jiang  <tijiang@rim.com>
1868
1869         Adjust date input width.
1870         https://bugs.webkit.org/show_bug.cgi?id=100760.
1871
1872         Reviewed by Rob Buis.
1873
1874         BlackBerry PR 343497.
1875         Internally Reviewed by Jeff Rogers.
1876
1877         Set width to auto to fit the string length.
1878
1879         * css/themeBlackBerry.css:
1880         (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
1881
1882 2013-05-27  Andreas Kling  <akling@apple.com>
1883
1884         Document::setHoveredNode() should be setHoveredElement().
1885         <http://webkit.org/b/116819>
1886
1887         Reviewed by Antti Koivisto.
1888
1889         Only Elements can be hovered, teach Document about this.
1890
1891         * dom/Document.h:
1892         * dom/Document.cpp:
1893         (WebCore::Document::dispose):
1894         (WebCore::Document::detach):
1895
1896             m_hoverNode => m_hoveredElement.
1897             Removed hoverNode() and setHoverNode() since those were only used internally.
1898
1899         (WebCore::Document::updateHoverActiveState):
1900
1901             Updated for hovered things always being Elements.
1902
1903         (WebCore::Document::hoveredElementDidDetach):
1904         * dom/Element.cpp:
1905         (WebCore::Element::detach):
1906
1907             Renamed Document::hoveredNodeDetached() to hoveredElementDidDetach() and fix it up
1908             following the same pattern as elementInActiveChainDidDetach().
1909
1910 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1911
1912         [Qt] REGRESSION(r150716): It made 15 inspector and 1 mozilla test to assert
1913         https://bugs.webkit.org/show_bug.cgi?id=116822
1914
1915         Reviewed by Andreas Kling.
1916
1917         The input fontDescription may have more than one family defined.
1918
1919         * platform/qt/RenderThemeQStyle.cpp:
1920         (WebCore::RenderThemeQStyle::adjustButtonStyle):
1921
1922 2013-05-27  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
1923
1924         [Qt][Win] Input events aren't mapped properly with windowless plugins.
1925         https://bugs.webkit.org/show_bug.cgi?id=116094
1926
1927         Reviewed by Tor Arne Vestbø.
1928
1929         The events are first sent properly but Flash then immediately repaints
1930         and this causes flickering painting.
1931         The issue is that Flash seems to be doing some input event tracking of
1932         its own internally, using the HWND returned through NPN_GetValue(NPNVnetscapeWindow).
1933
1934         We are currently using two coordinate systems for windowless plugins on Windows with Qt:
1935         - FrameView coordinates: Used for input events and ajusted with the WM_WINDOWPOSCHANGED message
1936         - Drawable coordinates: Used by WM_PAINT and adjusted with NPP_SetWindow
1937
1938         This patch fixes the bug by mapping input events to the native window returned
1939         as NPNVnetscapeWindow instead of the FrameView to ensure that those coordinates will match
1940         the ones used by Flash internally.
1941         With this we shouldn't be using FrameView coordinates anywhere for windowless plugins
1942         on Windows with Qt.
1943
1944         * platform/qt/QWebPageClient.h:
1945         (QWebPageClient):
1946           Added mapToOwnerWindow to the interface, mapping from the FrameView up to the wrapping nativeParentWidget.
1947         * plugins/win/PluginViewWin.cpp:
1948         (WebCore::contentsToNativeWindow):
1949         (WebCore::PluginView::paintIntoTransformedContext):
1950         (WebCore::PluginView::handleMouseEvent):
1951
1952 2013-05-27  Antti Koivisto  <antti@apple.com>
1953
1954         Tighten FontGlyphs interfaces to take FontDescription instead of Font
1955         https://bugs.webkit.org/show_bug.cgi?id=116818
1956
1957         Reviewed by Andreas Kling.
1958
1959         This gives better understanding of what the actual inputs are.
1960
1961         * WebCore.exp.in:
1962         * platform/graphics/Font.h:
1963         (WebCore::Font::primaryFont):
1964         (WebCore::Font::fontDataAt):
1965         (WebCore::Font::isFixedPitch):
1966         * platform/graphics/FontCache.cpp:
1967         (WebCore::FontCache::getFontData):
1968         * platform/graphics/FontCache.h:
1969         * platform/graphics/FontFallbackList.cpp:
1970         (WebCore::FontGlyphs::determinePitch):
1971         (WebCore::FontGlyphs::realizeFontDataAt):
1972         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
1973         * platform/graphics/FontFallbackList.h:
1974         (WebCore::FontGlyphs::primaryFontData):
1975         (WebCore::FontGlyphs::isFixedPitch):
1976         (WebCore::FontGlyphs::primarySimpleFontData):
1977         * platform/graphics/blackberry/FontCacheBlackBerry.cpp:
1978         * platform/graphics/freetype/FontCacheFreeType.cpp:
1979         * platform/graphics/mac/FontCacheMac.mm:
1980         (WebCore::FontCache::similarFontPlatformData):
1981         
1982             Drop get* naming and make this Mac only as no other platform has it.
1983
1984         * platform/graphics/qt/FontCacheQt.cpp:
1985         * platform/graphics/win/FontCacheWin.cpp:
1986         * platform/graphics/wince/FontCacheWinCE.cpp:
1987         (WebCore):
1988
1989 2013-05-27  Andreas Kling  <akling@apple.com>
1990
1991         Strengthen typing of detaching an Element from Document's :active chain.
1992         <http://webkit.org/b/116815>
1993
1994         Reviewed by Antti Koivisto.
1995
1996         Tiny cleanup now that the :active chain can only contain elements.
1997         Rename Document::activeChainNodeDetached() to elementInActiveChainDidDetach().
1998
1999         * dom/Element.cpp:
2000         (WebCore::Element::detach):
2001         * dom/Document.h:
2002         * dom/Document.cpp:
2003         (WebCore::Document::elementInActiveChainDidDetach):
2004
2005             Rename, take Element*, remove silly condition that was always true.
2006
2007 2013-05-27  Andrei Bucur  <abucur@adobe.com>
2008
2009         [CSS Regions] Remove the offsetFromLogicalTopOfFirstPage parameter from layout functions
2010         https://bugs.webkit.org/show_bug.cgi?id=116441
2011
2012         Reviewed by David Hyatt.
2013
2014         The patch changes the following things:
2015         - exposes offsetFromLogicalTopOfFirstPage() to all the RenderBoxes;
2016         - offsetFromLogicalTopOfFirstPage() is now safe to call from any box inside a flow thread, not only the
2017         currently being laid out;
2018         - removes the offsetFromLogicalTopOfFirstPage parameter from all the layout functions
2019         that didn't actually required it; when the value is necessary, the offsetFromLogicalTopOfFirstPage
2020         function is called instead;
2021         - RenderFlowThread now handles its own logic for obtaining the offset from logical top of the first
2022         region for a box, based on the layout states pushed on RenderView; it provides a better caching mechanism
2023         that can be used for all the ancestor containing blocks of the current box being laid out.
2024
2025         The RenderBoxRegionInfo structures are cached only based on the box and the region. This means that
2026         passing around a value for offsetFromLogicalTopOfFirstPage different in some cases than others was
2027         risky. If there is a possibility of having a different box info result for a different offset
2028         then the cache is not working correctly.
2029
2030         Tests: No function change, no tests.
2031
2032         * rendering/RenderBlock.cpp:
2033         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
2034         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2035         (WebCore::RenderBlock::logicalRightOffsetForContent):
2036         (WebCore::RenderBlock::getClearDelta):
2037         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
2038         (WebCore::RenderBlock::offsetFromLogicalTopOfFirstPage):
2039         (WebCore::RenderBlock::logicalWidthChangedInRegions):
2040         * rendering/RenderBlock.h:
2041         (WebCore::RenderBlock::availableLogicalWidthForLine):
2042         (WebCore::RenderBlock::logicalRightOffsetForLine):
2043         (WebCore::RenderBlock::logicalLeftOffsetForLine):
2044         (WebCore::RenderBlock::startOffsetForLine):
2045         (WebCore::RenderBlock::endOffsetForLine):
2046         (WebCore::RenderBlock::availableLogicalWidthForContent):
2047         (WebCore::RenderBlock::startOffsetForContent):
2048         (WebCore::RenderBlock::endOffsetForContent):
2049         (WebCore::RenderBlock::logicalLeftOffsetForContent):
2050         (WebCore::RenderBlock::logicalRightOffsetForContent):
2051         * rendering/RenderBox.cpp:
2052         (WebCore::RenderBox::borderBoxRectInRegion):
2053         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
2054         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2055         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
2056         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2057         (WebCore::RenderBox::computeLogicalWidthInRegion):
2058         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2059         (WebCore::RenderBox::renderBoxRegionInfo):
2060         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2061         (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
2062         (WebCore::computeInlineStaticDistance):
2063         (WebCore::RenderBox::computePositionedLogicalWidth):
2064         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2065         (WebCore::RenderBox::computePositionedLogicalHeight):
2066         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2067         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
2068         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
2069         (WebCore::RenderBox::offsetFromLogicalTopOfFirstPage):
2070         * rendering/RenderBox.h:
2071         * rendering/RenderFlexibleBox.cpp:
2072         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
2073         * rendering/RenderFlowThread.cpp:
2074         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
2075         (WebCore::RenderFlowThread::hasCachedOffsetFromLogicalTopOfFirstRegion):
2076         (WebCore::RenderFlowThread::cachedOffsetFromLogicalTopOfFirstRegion):
2077         (WebCore::RenderFlowThread::setOffsetFromLogicalTopOfFirstRegion):
2078         (WebCore::RenderFlowThread::clearOffsetFromLogicalTopOfFirstRegion):
2079         (WebCore::RenderFlowThread::currentActiveRenderBox):
2080         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
2081         (WebCore::RenderFlowThread::popFlowThreadLayoutState):
2082         (WebCore::RenderFlowThread::offsetFromLogicalTopOfFirstRegion):
2083         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
2084         * rendering/RenderFlowThread.h:
2085         * rendering/RenderTable.cpp:
2086         (WebCore::RenderTable::updateLogicalWidth):
2087         * rendering/RenderView.cpp:
2088         (WebCore::RenderView::pushLayoutState):
2089         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
2090         (WebCore::RenderView::popLayoutStateForCurrentFlowThread):
2091         * rendering/RenderView.h:
2092         (WebCore::RenderView::pushLayoutState):
2093         (WebCore::RenderView::popLayoutState):
2094
2095 2013-05-27  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2096
2097         Active DOM objects stopped twice
2098         https://bugs.webkit.org/show_bug.cgi?id=116524
2099
2100         Reviewed by Alexey Proskuryakov.
2101
2102         Only iterate over all active DOM object to stop them once.
2103
2104         To ensure later created active DOM objects are stopped,
2105         suspendActiveDOMObjectIfNeeded now also stops active DOM objects
2106         if needed. This also fixes an existing bug when active DOM
2107         objects were created after stopActiveDOMObjects had been called.
2108
2109         Two existing tests creates new active DOM objects after stopActiveDOMObjects
2110         has been called:
2111             fast/dom/xmlhttprequest-constructor-in-detached-document.html
2112             fast/dom/Window/timer-null-script-execution-context.html
2113
2114         * dom/ScriptExecutionContext.cpp:
2115         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2116         (WebCore::ScriptExecutionContext::suspendActiveDOMObjectIfNeeded):
2117
2118 2013-05-27  Charles Wei  <charles.wei@torchmobile.com.cn>
2119
2120         Remove redundant CachedRawResource::loader()
2121         https://bugs.webkit.org/show_bug.cgi?id=116805
2122
2123         Reviewed by Andreas Kling.
2124
2125         Just remove redundant code, no test case needed.
2126
2127         * loader/cache/CachedRawResource.cpp:
2128         * loader/cache/CachedRawResource.h:
2129
2130 2013-05-27  Andreas Kling  <akling@apple.com>
2131
2132         WinCE build TLC: Node::active() moved to Element.
2133
2134         * rendering/RenderThemeWinCE.cpp:
2135         (WebCore::RenderThemeWinCE::paintSearchFieldCancelButton):
2136
2137 2013-05-26  Jaehun Lim  <ljaehun.lim@samsung.com>
2138
2139         CSSParser::parseImageResolution doesn't need a parameter.
2140         https://bugs.webkit.org/show_bug.cgi?id=116755
2141
2142         Reviewed by Darin Adler.
2143
2144         parseImageResolution() can get CSSPraserValueList from m_valueList directly.
2145
2146         No new tests, no behavior change.
2147
2148         * css/CSSParser.cpp:
2149         (WebCore::CSSParser::parseImageResolution):
2150         * css/CSSParser.h:
2151
2152 2013-05-26  Andreas Kling  <akling@apple.com>
2153
2154         Turn TreeScope::focusedNode() into focusedElement().
2155         <http://webkit.org/b/116802>
2156
2157         Reviewed by Darin Adler.
2158
2159         For the hundredth time, only Elements can be focused!
2160
2161         This change mostly reverts r121079 since that made things unnecessarily complicated
2162         just to tweak the behavior of ShadowRoot.activeElement, an API that we don't expose.
2163         Finding a TreeScope's focused element now does a simple walk up the parent chain instead
2164         of running the full Shadow DOM re-targeting algorithm.
2165
2166         (WebCore::TreeScope::focusedElement):
2167
2168             Simplify and return Element* instead of Node*.
2169
2170         * dom/TreeScope.h:
2171         * dom/TreeScope.cpp:
2172         (WebCore::focusedFrameOwnerElement):
2173
2174             Make this return Element* as the name already suggested.
2175
2176         * dom/Document.cpp:
2177         (WebCore::Document::removeFocusedNodeOfSubtree):
2178         * dom/Element.cpp:
2179         (WebCore::Element::blur):
2180         * dom/ShadowRoot.h:
2181         (WebCore::ShadowRoot::activeElement):
2182         * html/HTMLDocument.cpp:
2183         (WebCore::HTMLDocument::activeElement):
2184
2185             Simplified call sites that were paranoid about getting a non-Element focused node.
2186
2187 2013-05-26  Dean Jackson  <dino@apple.com>
2188
2189         Plugins with no src but valid type should not snapshot
2190         https://bugs.webkit.org/show_bug.cgi?id=116799
2191         <rdar://problem/13695911>
2192
2193         Reviewed by Simon Fraser.
2194
2195         There are a few plug-ins around that don't take any source content
2196         via the src attribute, but rather just load the binary based on the
2197         mime-type. In those cases we shouldn't snapshot until we have a
2198         mechanism to do so.
2199
2200         * html/HTMLPlugInImageElement.cpp:
2201         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2202             Add MIMEType logging, and detect the case of no src but valid type.
2203         * html/HTMLPlugInImageElement.h: Add another SnapshotReason enum for
2204             this special case.
2205
2206 2013-05-26  Antti Koivisto  <antti@apple.com>
2207
2208         Encapsulate FontGlyphs
2209         https://bugs.webkit.org/show_bug.cgi?id=116803
2210
2211         Reviewed by Andreas Kling.
2212
2213         FontGlyphs is unfriending Font. Give it a real class interface and some actual code.
2214
2215         * platform/graphics/Font.cpp:
2216         (WebCore::Font::Font):
2217         * platform/graphics/Font.h:
2218         (WebCore::Font::glyphDataForCharacter):
2219         (WebCore::Font::glyphDataAndPageForCharacter):
2220         * platform/graphics/FontFallbackList.cpp:
2221         (WebCore::FontGlyphs::FontGlyphs):
2222         (WebCore::isInRange):
2223         (WebCore::shouldIgnoreRotation):
2224         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation):
2225         
2226             Helpers from FontFastPath.cpp.
2227
2228         (WebCore::FontGlyphs::glyphDataAndPageForCharacter):
2229         
2230             This is the primary interface. The code moves here from FontFastPath.cpp.
2231
2232         * platform/graphics/FontFallbackList.h:
2233         (WebCore::FontGlyphs::createForPlatformData):
2234         
2235             Remove setPlatformData in favor of constructor.
2236
2237         (WebCore::FontGlyphs::primarySimpleFontData):
2238         * platform/graphics/FontFastPath.cpp:
2239         * platform/graphics/GraphicsContext.h:
2240
2241             Remove a stray function definition also called setPlatformFont().
2242
2243         * rendering/svg/SVGTextRunRenderingContext.cpp:
2244         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2245
2246 2013-05-26  Seokju Kwon  <seokju.kwon@gmail.com>
2247
2248         Remove a leftover CALENDAR_PICKER from LocaleNone.cpp
2249         https://bugs.webkit.org/show_bug.cgi?id=116800
2250
2251         Reviewed by Kent Tamura.
2252
2253         No new tests, no behavior change.
2254
2255         * platform/text/LocaleNone.cpp:
2256         (LocaleNone):
2257
2258 2013-05-26  Antti Koivisto  <antti@apple.com>
2259
2260         Rename FontFallbackList to FontGlyphs
2261         https://bugs.webkit.org/show_bug.cgi?id=116797
2262
2263         Reviewed by Andreas Kling.
2264
2265         Maybe it was a fallback list once. Nowadays its purpose is to cache realized glyphs and related data.
2266         
2267         File renaming will be done separately.
2268
2269         * WebCore.exp.in:
2270         * platform/graphics/Font.cpp:
2271         (WebCore::Font::Font):
2272         (WebCore::Font::operator=):
2273         (WebCore::Font::operator==):
2274         
2275             Refactored to early return style.
2276
2277         (WebCore::Font::update):
2278         (WebCore::Font::width):
2279         * platform/graphics/Font.h:
2280         (Font):
2281         (WebCore::Font::glyphs):
2282         (WebCore::Font::loadingCustomFonts):
2283         (WebCore::Font::primaryFont):
2284         (WebCore::Font::fontDataAt):
2285         (WebCore::Font::isFixedPitch):
2286         (WebCore::Font::fontSelector):
2287         * platform/graphics/FontCache.h:
2288         (FontCache):
2289         * platform/graphics/FontFallbackList.cpp:
2290         (WebCore::FontGlyphs::FontGlyphs):
2291         (WebCore::FontGlyphs::invalidate):
2292         (WebCore::FontGlyphs::releaseFontData):
2293         (WebCore::FontGlyphs::determinePitch):
2294         (WebCore::FontGlyphs::realizeFontDataAt):
2295         
2296             Renamed for clarity along with m_fontList -> m_realizedFontData.
2297
2298         (WebCore::FontGlyphs::setPlatformFont):
2299         * platform/graphics/FontFallbackList.h:
2300         (FontGlyphs):
2301         (WebCore::FontGlyphs::GlyphPagesStateSaver::GlyphPagesStateSaver):
2302         (WebCore::FontGlyphs::GlyphPagesStateSaver::~GlyphPagesStateSaver):
2303         (GlyphPagesStateSaver):
2304         (WebCore::FontGlyphs::create):
2305         (WebCore::FontGlyphs::~FontGlyphs):
2306         (WebCore::FontGlyphs::primaryFontData):
2307         * platform/graphics/FontFastPath.cpp:
2308         (WebCore::Font::glyphDataAndPageForCharacter):
2309         * rendering/svg/SVGTextRunRenderingContext.cpp:
2310         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2311
2312 2013-05-26  Kent Tamura  <tkent@chromium.org>
2313
2314         Remove ENABLE_CALENDAR_PICKER
2315         https://bugs.webkit.org/show_bug.cgi?id=116795
2316
2317         Reviewed by Ryosuke Niwa.
2318
2319         This feature was used only by Chromium port.
2320
2321         * Resources/pagepopups/calendarPicker.css: Removed.
2322         * Resources/pagepopups/calendarPicker.js: Removed.
2323         * css/html.css:
2324         * platform/text/LocaleICU.cpp:
2325         (WebCore::LocaleICU::LocaleICU):
2326         (WebCore):
2327         * platform/text/LocaleICU.h:
2328         (LocaleICU):
2329         * platform/text/PlatformLocale.h:
2330         (Locale):
2331         * platform/text/mac/LocaleMac.h:
2332         (LocaleMac):
2333         * platform/text/mac/LocaleMac.mm:
2334         (WebCore::LocaleMac::monthLabels):
2335         * platform/text/win/LocaleWin.cpp:
2336         (WebCore::LocaleWin::LocaleWin):
2337         (WebCore::LocaleWin::monthLabels):
2338         * platform/text/win/LocaleWin.h:
2339         (LocaleWin):
2340
2341 2013-05-26  Andreas Kling  <akling@apple.com>
2342
2343         Move :active chain participation state from Node to Element.
2344         <http://webkit.org/b/116786>
2345
2346         Reviewed by Antti Koivisto.
2347
2348         Only Elements can be in the :active chain so move the logic there from Node.
2349
2350         * dom/Document.cpp:
2351         (WebCore::Document::updateHoverActiveState):
2352
2353             Add isElementNode() type checks when updating the :active chain.
2354
2355         * dom/Node.h:
2356         * dom/Node.cpp:
2357         (WebCore::Node::detach):
2358         * dom/Element.cpp:
2359         (WebCore::Element::detach):
2360
2361             Move the remaining logic for detaching from the UserActionElementSet to Element.
2362
2363         (WebCore::Element::isUserActionElementInActiveChain):
2364         * dom/Element.h:
2365         (WebCore::Element::inActiveChain):
2366
2367             Move all the :active chain stuff from Node to Element.
2368
2369         * dom/UserActionElementSet.cpp:
2370         (WebCore::UserActionElementSet::didDetach):
2371         * dom/UserActionElementSet.h:
2372         (WebCore::UserActionElementSet::isInActiveChain):
2373         (WebCore::UserActionElementSet::setInActiveChain):
2374
2375             UserActionElementSet now only takes Element* in its API.
2376
2377 2013-05-26  Antti Koivisto  <antti@apple.com>
2378
2379         Remove FontFamily.h/.cpp
2380         https://bugs.webkit.org/show_bug.cgi?id=116788
2381
2382         Reviewed by Anders Carlsson.
2383         
2384         Empty files.
2385
2386         * CMakeLists.txt:
2387         * GNUmakefile.list.am:
2388         * Target.pri:
2389         * WebCore.vcproj/WebCore.vcproj:
2390         * WebCore.vcxproj/WebCore.vcxproj:
2391         * WebCore.xcodeproj/project.pbxproj:
2392         * platform/graphics/FontDescription.h:
2393         * platform/graphics/FontFamily.cpp: Removed.
2394         * platform/graphics/FontFamily.h: Removed.
2395
2396 2013-05-26  Antti Koivisto  <antti@apple.com>
2397
2398         Use Vector instead of custom linked list for font families
2399         https://bugs.webkit.org/show_bug.cgi?id=116783
2400
2401         Reviewed by Andreas Kling.
2402
2403         Get rid of FontFamily and SharedFontFamily.
2404
2405         * accessibility/AccessibilityRenderObject.cpp:
2406         (WebCore::AccessibilityRenderObject::hasSameFont):
2407         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2408         (getAttributeSetForAccessibilityObject):
2409         * css/CSSComputedStyleDeclaration.cpp:
2410         (WebCore::fontFamilyFromStyle):
2411         * css/DeprecatedStyleBuilder.cpp:
2412         (WebCore::ApplyPropertyFontFamily::applyInheritValue):
2413         (WebCore::ApplyPropertyFontFamily::applyInitialValue):
2414         (WebCore::ApplyPropertyFontFamily::applyValue):
2415         * css/StyleResolver.cpp:
2416         (WebCore::StyleResolver::styleForDocument):
2417         (WebCore::StyleResolver::initializeFontStyle):
2418         * html/canvas/CanvasRenderingContext2D.cpp:
2419         (WebCore::CanvasRenderingContext2D::font):
2420         (WebCore::CanvasRenderingContext2D::setFont):
2421         * page/PrintContext.cpp:
2422         (WebCore::PrintContext::pageProperty):
2423         * platform/efl/RenderThemeEfl.cpp:
2424         (WebCore::RenderThemeEfl::systemFont):
2425         * platform/graphics/Font.h:
2426         (WebCore::Font::firstFamily):
2427         (WebCore::Font::familyCount):
2428         (WebCore::Font::familyAt):
2429         * platform/graphics/FontCache.cpp:
2430         (WebCore::FontCache::getFontData):
2431         * platform/graphics/FontDescription.cpp:
2432         (SameSizeAsFontDescription):
2433         * platform/graphics/FontDescription.h:
2434         (WebCore::FontDescription::FontDescription):
2435         (WebCore::FontDescription::familyCount):
2436         (WebCore::FontDescription::firstFamily):
2437         (WebCore::FontDescription::familyAt):
2438         (WebCore::FontDescription::families):
2439         (WebCore::FontDescription::useFixedDefaultSize):
2440         (WebCore::FontDescription::setOneFamily):
2441         (WebCore::FontDescription::setFamilies):
2442         (WebCore::FontDescription::adoptFamilies):
2443         (WebCore::FontDescription::operator==):
2444         * platform/graphics/FontFamily.cpp:
2445         * platform/graphics/FontFamily.h:
2446         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
2447         (PlatformCALayerWinInternal::displayCallback):
2448         * platform/graphics/mac/FontCacheMac.mm:
2449         (WebCore::FontCache::getSimilarFontPlatformData):
2450         * platform/graphics/qt/FontCacheQt.cpp:
2451         (WebCore::FontCache::getLastResortFallbackFont):
2452         * platform/gtk/RenderThemeGtk.cpp:
2453         (WebCore::RenderThemeGtk::systemFont):
2454         * platform/mac/ThemeMac.mm:
2455         (WebCore::ThemeMac::controlFont):
2456         * platform/qt/RenderThemeQStyle.cpp:
2457         (WebCore::RenderThemeQStyle::adjustButtonStyle):
2458         * platform/text/transcoder/FontTranscoder.cpp:
2459         (WebCore::FontTranscoder::converterType):
2460         * platform/win/DragImageWin.cpp:
2461         (WebCore::dragLabelFont):
2462         * rendering/RenderText.cpp:
2463         (WebCore::RenderText::styleDidChange):
2464         * rendering/RenderTextControl.cpp:
2465         (WebCore::RenderTextControl::computeIntrinsicLogicalWidths):
2466         * rendering/RenderTextControlSingleLine.cpp:
2467         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
2468         * rendering/RenderThemeMac.mm:
2469         (WebCore::RenderThemeMac::systemFont):
2470         (WebCore::RenderThemeMac::setFontFromControlSize):
2471         * rendering/RenderThemeSafari.cpp:
2472         (WebCore::RenderThemeSafari::systemFont):
2473         (WebCore::RenderThemeSafari::setFontFromControlSize):
2474         * rendering/RenderThemeWin.cpp:
2475         (WebCore::fillFontDescription):
2476
2477 2013-05-26  Andreas Kling  <akling@apple.com>
2478
2479         Move "active" state logic from Node to Element.
2480         <http://webkit.org/b/116785>
2481
2482         Reviewed by Antti Koivisto.
2483
2484         Resolve another 7 year old FIXME by merging the "active" state logic from Node and ContainerNode
2485         and moving it all to Element instead.
2486
2487         * dom/UserActionElementSet.h:
2488         (WebCore::UserActionElementSet::isActive):
2489         (WebCore::UserActionElementSet::setActive):
2490         * dom/ContainerNode.cpp:
2491         * dom/ContainerNode.h:
2492         * dom/Node.cpp:
2493         * dom/Node.h:
2494         * dom/Element.h:
2495         (WebCore::Element::active):
2496         * dom/Element.cpp:
2497         (WebCore::Element::isUserActionElementActive):
2498         (WebCore::Element::setActive):
2499
2500             Moved here from Node/ContainerNode.
2501
2502         * accessibility/AccessibilityNodeObject.cpp:
2503         (WebCore::AccessibilityNodeObject::isPressed):
2504         * dom/Document.cpp:
2505         (WebCore::Document::setFocusedNode):
2506         (WebCore::Document::updateHoverActiveState):
2507         * rendering/RenderTheme.cpp:
2508         (WebCore::RenderTheme::isPressed):
2509         (WebCore::RenderTheme::isSpinUpButtonPartPressed):
2510         * rendering/RenderThemeMac.mm:
2511         (WebCore::getMediaUIPartStateFlags):
2512         (WebCore::RenderThemeMac::updatePressedState):
2513         * platform/qt/RenderThemeQt.cpp:
2514         (WebCore::RenderThemeQt::getMediaControlForegroundColor):
2515
2516             Check that the inspected Node is an Element before asking if it's active.
2517
2518         * html/HTMLAnchorElement.cpp:
2519         (WebCore::HTMLAnchorElement::setActive):
2520
2521             Call the right superclass.
2522
2523         * html/HTMLAnchorElement.h:
2524         * html/HTMLLabelElement.h:
2525         * html/shadow/MediaControlElementTypes.h:
2526
2527             Sprinkle OVERRIDE>
2528
2529 2013-05-26  Andreas Kling  <akling@apple.com>
2530
2531         Move Node::dispatchSimulatedClick() to Element.
2532         <http://webkit.org/b/116784>
2533
2534         Reviewed by Antti Koivisto.
2535
2536         Only Elements use the dispatchSimulatedClick() functionality, so move it there.
2537
2538         * dom/Node.cpp:
2539         * dom/Node.h:
2540         * dom/Element.h:
2541         * dom/Element.cpp:
2542         (WebCore::Element::dispatchSimulatedClick):
2543         * dom/EventDispatcher.h:
2544         * dom/EventDispatcher.cpp:
2545         (WebCore::EventDispatcher::dispatchSimulatedClick):
2546
2547 2013-05-26  Andreas Kling  <akling@apple.com>
2548
2549         TreeScope::rootNode() should return a ContainerNode.
2550         <http://webkit.org/b/116782>
2551
2552         Reviewed by Antti Koivisto.
2553
2554         The rootNode() of a TreeScope is always a ContainerNode, so update pointer types to reflect that.
2555         This lets us take advantage of Antti's optimized traversal functions.
2556
2557         * dom/ContainerNode.h:
2558         (WebCore::Node::isTreeScope):
2559         * dom/Document.cpp:
2560         (WebCore::Document::buildAccessKeyMap):
2561         * dom/Node.cpp:
2562         (WebCore::Node::containingShadowRoot):
2563         * dom/Node.h:
2564         * dom/TreeScope.h:
2565         (WebCore::TreeScope::rootNode):
2566         (TreeScope):
2567         * page/FocusController.cpp:
2568         (WebCore::FocusNavigationScope::rootNode):
2569         (WebCore::FocusNavigationScope::owner):
2570         * page/FocusController.h:
2571         (FocusNavigationScope):
2572
2573 2013-05-26  Andreas Kling  <akling@apple.com>
2574
2575         FocusController::setFocusedNode() should be setFocusedElement().
2576         <http://webkit.org/b/116780>
2577
2578         Reviewed by Antti Koivisto.
2579
2580         Only Elements can have focus, so make the public API of FocusController take Element*.
2581
2582         * WebCore.exp.in:
2583         * page/FocusController.h:
2584         * page/FocusController.cpp:
2585         (WebCore::FocusController::setFocusedElement):
2586
2587             Out with the setFocusedNode(), in with the setFocusedElement().
2588
2589         * dom/Element.cpp:
2590         (WebCore::Element::focus):
2591         (WebCore::Element::blur):
2592         * page/EventHandler.cpp:
2593         (WebCore::EventHandler::dispatchMouseEvent):
2594         * plugins/PluginView.cpp:
2595         (WebCore::PluginView::focusPluginElement):
2596         * editing/FrameSelection.cpp:
2597         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
2598
2599             Tweak for FocusController taking Element* instead of Node*.
2600
2601         (WebCore::FrameSelection::setFocusedElementIfNeeded):
2602
2603             Renamed from setFocusedNodeIfNeeded().
2604
2605         * editing/htmlediting.h:
2606         * editing/htmlediting.cpp:
2607         (WebCore::enclosingAnchorElement):
2608
2609             Cleaned up the loop for readability and made it return an Element.
2610
2611 2013-05-26  Andreas Kling  <akling@apple.com>
2612
2613         Move some form control things from Element to HTMLFormControlElement.
2614         <http://webkit.org/b/116779>
2615
2616         Reviewed by Antti Koivisto.
2617
2618         The following methods sit better on HTMLFormControlElement than on Element:
2619
2620             - formControlType()
2621             - wasChangedSinceLastFormControlChangeEvent()
2622             - setChangedSinceLastFormControlChangeEvent()
2623             - dispatchFormControlChangeEvent()
2624
2625         Moved them, and devirtualized as much as possible.
2626
2627         * dom/Document.cpp:
2628         (WebCore::Document::setFocusedNode):
2629
2630             Check if the old focus target is an Element before (possibly) dispatching a change event.
2631
2632         * dom/Element.cpp:
2633         * dom/Element.h:
2634
2635             Removed some stub methods that were only used by HTMLFormControlElement subclasses.
2636
2637         * html/HTMLFormControlElement.cpp:
2638         * html/HTMLFormControlElement.h:
2639         (WebCore::isHTMLFormControlElement):
2640         (WebCore::toHTMLFormControlElement):
2641
2642             Add toHTMLFormControlElement() helper with ASSERT_WITH_SECURITY_IMPLICATION.
2643
2644         * html/HTMLTextFormControlElement.h:
2645
2646             Sprinkle OVERRIDE.
2647
2648 2013-05-25  Andreas Kling  <akling@apple.com>
2649
2650         Move Node::supportsFocus() to Element.
2651         <http://webkit.org/b/116778>
2652
2653         Reviewed by Antti Koivisto.
2654
2655         Node never supports focus, so move supportsFocus() to Element instead.
2656
2657         * dom/Element.h:
2658         * dom/Node.cpp:
2659         * dom/Node.h:
2660
2661             Removed Node::supportsFocus(), it always returned false anyway.
2662
2663         * accessibility/AccessibilityNodeObject.cpp:
2664         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2665
2666             Check that the underlying Node is an Element before asking if it supports focus.
2667
2668         * html/HTMLAnchorElement.h:
2669         * html/HTMLAreaElement.h:
2670         * html/HTMLBodyElement.h:
2671         * html/HTMLElement.h:
2672         * html/HTMLFieldSetElement.h:
2673         * html/HTMLFormControlElement.h:
2674         * html/HTMLFrameElementBase.h:
2675         * html/HTMLMediaElement.h:
2676         * html/HTMLOptGroupElement.h:
2677         * html/HTMLOptionElement.h:
2678         * html/HTMLOutputElement.h:
2679         * svg/SVGAElement.h:
2680         * svg/SVGCircleElement.h:
2681         * svg/SVGEllipseElement.h:
2682         * svg/SVGGElement.h:
2683         * svg/SVGImageElement.h:
2684         * svg/SVGLineElement.h:
2685         * svg/SVGPathElement.h:
2686         * svg/SVGPolyElement.h:
2687         * svg/SVGRectElement.h:
2688         * svg/SVGSVGElement.h:
2689         * svg/SVGSwitchElement.h:
2690         * svg/SVGSymbolElement.h:
2691         * svg/SVGTextElement.h:
2692         * svg/SVGUseElement.h:
2693
2694             OVERRIDE ALL THE THINGS!
2695
2696 2013-05-25  Andreas Kling  <akling@apple.com>
2697
2698         Move Node::isFocusable() to Element.
2699         <http://webkit.org/b/116777>
2700
2701         Reviewed by Anders Carlsson.
2702
2703         Nodes cannot be focusable, so move isFocusable() from Node to Element.
2704
2705         * dom/Node.cpp:
2706         * dom/Node.h:
2707         * dom/Element.h:
2708         * dom/Element.cpp:
2709         (WebCore::Element::isFocusable):
2710
2711             Moved here from Node.
2712
2713         * dom/Document.cpp:
2714         (WebCore::Document::setFocusedNode):
2715         * accessibility/AccessibilityNodeObject.cpp:
2716         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2717
2718             Check that the underlying node is an Element before asking if it's focusable.
2719
2720         * page/FrameView.cpp:
2721         (WebCore::FrameView::scrollToAnchor):
2722
2723             Renamed the 'anchorNode' variable to 'anchorElement' because reasons.
2724
2725         * html/HTMLAreaElement.h:
2726         * html/HTMLFormControlElement.h:
2727         * html/HTMLLabelElement.h:
2728         * html/HTMLOptionElement.h:
2729         * svg/SVGAElement.h:
2730
2731             Sprinkle OVERRIDE.
2732
2733         * html/ValidationMessage.cpp:
2734         (WebCore::ValidationMessage::setMessage):
2735
2736             Update a comment to refer to Element::isFocusable() instead of Node.
2737
2738 2013-05-25  Andreas Kling  <akling@apple.com>
2739
2740         Move Node::tabIndex() to Element.
2741         <http://webkit.org/b/116772>
2742
2743         Reviewed by Ryosuke Niwa.
2744
2745         Since only Elements are keyboard-focusable, it doesn't make sense for Node to have a tabIndex().
2746
2747         * dom/Element.h:
2748         * dom/Node.cpp:
2749         * dom/Node.h:
2750
2751             A Node can't have a tab index, so move tabIndex() to Element.
2752
2753         * page/FocusController.h:
2754         * page/FocusController.cpp:
2755         (WebCore::adjustedTabIndex):
2756         (WebCore::FocusController::findElementWithExactTabIndex):
2757         (WebCore::nextElementWithGreaterTabIndex):
2758         (WebCore::previousElementWithLowerTabIndex):
2759         (WebCore::FocusController::nextFocusableNode):
2760         (WebCore::FocusController::previousFocusableNode):
2761
2762             Make this code deal in Element* when doing tab index stuff. FocusController needs
2763             more Node->Element cleanup, but let's do that separately.
2764
2765         * html/HTMLAnchorElement.h:
2766         * html/HTMLElement.h:
2767         * html/HTMLFormControlElement.h:
2768
2769             Sprinkle OVERRIDE.
2770
2771 2013-05-25  Andreas Kling  <akling@apple.com>
2772
2773         Don't instantiate ChildNodeLists just to get a child count.
2774         <http://webkit.org/b/116776>
2775
2776         Reviewed by Ryosuke Niwa.
2777
2778         Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().
2779
2780         * editing/ApplyStyleCommand.cpp:
2781         (WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):
2782
2783 2013-05-25  Andreas Kling  <akling@apple.com>
2784
2785         PluginDocument::pluginNode() should be pluginElement() instead.
2786         <http://webkit.org/b/116774>
2787
2788         Reviewed by Anders Carlsson.
2789
2790         Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.
2791
2792         * dom/Document.cpp:
2793         (WebCore::eventTargetNodeForDocument):
2794         * html/PluginDocument.h:
2795         * html/PluginDocument.cpp:
2796         (WebCore::PluginDocumentParser::createDocumentStructure):
2797         (WebCore::PluginDocument::pluginWidget):
2798         (WebCore::PluginDocument::setPluginElement):
2799         (WebCore::PluginDocument::detach):
2800
2801 2013-05-25  Andreas Kling  <akling@apple.com>
2802
2803         Remove Document::getFocusableNodes().
2804         <http://webkit.org/b/116773>
2805
2806         Reviewed by Joseph Pecoraro.
2807
2808         This was added in r42191 and there are no remaining clients of the API.
2809
2810         * dom/Document.cpp:
2811         * dom/Document.h:
2812         * WebCore.exp.in:
2813
2814 2013-05-25  Andreas Kling  <akling@apple.com>
2815
2816         Move Node::focusDelegate() to Element.
2817         <http://webkit.org/b/116768>
2818
2819         Reviewed by Anders Carlsson.
2820
2821         Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
2822         so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.
2823
2824         * dom/Node.cpp:
2825         * dom/Node.h:
2826         * dom/Element.h:
2827         * dom/Element.cpp:
2828         * html/shadow/SliderThumbElement.cpp:
2829         (WebCore::SliderThumbElement::focusDelegate):
2830         * html/shadow/SliderThumbElement.h:
2831         * rendering/RenderTheme.cpp:
2832         (WebCore::RenderTheme::isFocused):
2833         * rendering/RenderThemeMac.mm:
2834         (WebCore::RenderThemeMac::paintSliderThumb):
2835
2836 2013-05-25  Alberto Garcia  <agarcia@igalia.com>
2837
2838         Path: clean up addPathForRoundedRect()
2839         https://bugs.webkit.org/show_bug.cgi?id=116765
2840
2841         Reviewed by Andreas Kling.
2842
2843         Reorganize code that is a bit redundant.
2844
2845         No new tests, no behavior change.
2846
2847         * platform/graphics/Path.cpp:
2848         (WebCore::Path::addPathForRoundedRect):
2849
2850 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
2851
2852         Unprefix Page Visibility API
2853         https://bugs.webkit.org/show_bug.cgi?id=102340
2854
2855         Reviewed by Tim Horton.
2856         
2857         Remove prefixes from the document properties, and the visibilitychanged event.
2858         
2859         Rename the "preview" state to "unloaded". The "unloaded" state is never
2860         reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).
2861         
2862         Add some comments to places where we should update the visibility state
2863         when going in and out of the page cache, but cannot safely do so yet.
2864
2865         Tested by existing Page Visibility tests.
2866
2867         * dom/Document.cpp:
2868         (WebCore::Document::pageVisibilityState):
2869         (WebCore::Document::visibilityState):
2870         (WebCore::Document::hidden):
2871         (WebCore::Document::dispatchVisibilityStateChangeEvent):
2872         * dom/Document.h:
2873         * dom/Document.idl:
2874         * dom/EventNames.h:
2875         * history/CachedFrame.cpp:
2876         (WebCore::CachedFrameBase::restore):
2877         * loader/FrameLoader.cpp:
2878         (WebCore::FrameLoader::stopLoading):
2879         * page/Page.cpp:
2880         (WebCore::Page::setVisibilityState):
2881         * page/PageVisibilityState.cpp:
2882         (WebCore::pageVisibilityStateString):
2883         * page/PageVisibilityState.h:
2884
2885 2013-05-25  Andreas Kling  <akling@apple.com>
2886
2887         Move Node::isMouseFocusable() to Element.
2888         <http://webkit.org/b/116762>
2889
2890         Reviewed by Anders Carlsson.
2891
2892         Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
2893         since Node::supportsFocus() always returns false. So move it to Element!
2894
2895         * dom/Node.h:
2896         * dom/Node.cpp:
2897         * dom/Element.h:
2898         * dom/Element.cpp:
2899         (WebCore::Element::isMouseFocusable):
2900
2901             Moved here from Node.
2902
2903         * editing/FrameSelection.cpp:
2904         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
2905         * page/EventHandler.cpp:
2906         (WebCore::EventHandler::dispatchMouseEvent):
2907
2908             Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
2909             Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
2910             Elements and thus cannot be mouse-focusable.
2911
2912         * page/TouchAdjustment.cpp:
2913         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2914
2915             Check that the Node is an Element before asking if it's mouse-focusable.
2916
2917         * html/HTMLAnchorElement.h:
2918         * html/HTMLAreaElement.h:
2919         * html/HTMLFormControlElement.h:
2920         * html/HTMLInputElement.h:
2921         * html/HTMLMediaElement.h:
2922         * html/HTMLSelectElement.h:
2923         * html/HTMLTextAreaElement.h:
2924         * html/shadow/ClearButtonElement.h:
2925         * html/shadow/TextControlInnerElements.h:
2926         * svg/SVGAElement.h:
2927         * svg/SVGStyledElement.h:
2928
2929             Sprinkle OVERRIDE.
2930
2931 2013-05-25  Andreas Kling  <akling@apple.com>
2932
2933         Move Node::isKeyboardFocusable() to Element.
2934         <http://webkit.org/b/116761>
2935
2936         Reviewed by Antti Koivisto.
2937
2938         Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
2939         and sprinkle OVERRIDE on subclass overrides.
2940         FocusController gets some temporary type checks that will go away as that code moves to dealing in
2941         Elements instead of Node.
2942
2943         * dom/Node.h:
2944         * dom/Node.cpp:
2945         * dom/Element.h:
2946         * dom/Element.cpp:
2947         (WebCore::Element::isKeyboardFocusable):
2948
2949             Move isKeyboardFocusable() from Node to Element.
2950
2951         * page/FocusController.cpp:
2952         (WebCore::isNonFocusableShadowHost):
2953         (WebCore::isFocusableShadowHost):
2954         (WebCore::shouldVisit):
2955         (WebCore::FocusController::advanceFocusInDocumentOrder):
2956
2957             Check that the inspected Node is an Element before querying isKeyboardFocusable().
2958
2959         * html/HTMLAnchorElement.h:
2960         * html/HTMLAreaElement.h:
2961         * html/HTMLFormControlElement.h:
2962         * html/HTMLFrameOwnerElement.h:
2963         * html/HTMLInputElement.h:
2964         * html/HTMLPlugInElement.h:
2965         * html/HTMLSelectElement.h:
2966         * html/HTMLTextAreaElement.h:
2967         * svg/SVGAElement.h:
2968         * svg/SVGStyledElement.h:
2969
2970             Sprinkle OVERRIDE.
2971
2972 2013-05-25  Andreas Kling  <akling@apple.com>
2973
2974         Begin moving "focus" state logic from Node to Element.
2975         <http://webkit.org/b/116760>
2976
2977         Reviewed by Antti Koivisto.
2978
2979         Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
2980         and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
2981         with setFocus(bool) and focused().
2982
2983         * dom/Node.h:
2984         * dom/ContainerNode.cpp:
2985         * dom/ContainerNode.h:
2986         * dom/Element.cpp:
2987         (WebCore::Element::isUserActionElementFocused):
2988         (WebCore::Element::setFocus):
2989         * dom/Element.h:
2990         (WebCore::Element::focused):
2991         * dom/Node.cpp:
2992
2993             Move focused() and setFocus(bool) from Node/ContainerNode to Element.
2994
2995         * dom/Document.cpp:
2996         (WebCore::Document::setFocusedNode):
2997         * page/EventHandler.cpp:
2998         (WebCore::EventHandler::dispatchMouseEvent):
2999
3000             Check if the inspected Node is an Element before asking if it's focused.
3001
3002 2013-05-25  Noam Rosenthal  <noam.rosenthal@nokia.com>
3003
3004         Direct pattern compositing breaks when no-repeat is set on a large layer
3005         https://bugs.webkit.org/show_bug.cgi?id=116140
3006
3007         Reviewed by Antti Koivisto.
3008
3009         In some cases the directly composited background color logic overrides the layer's
3010         contentsRect, which results in wrong rendering of tiled images.
3011         This patch makes sure that the background image is applied after the solid color,
3012         which ensures the correct contentsRect.
3013
3014         Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html
3015
3016         * rendering/RenderLayerBacking.cpp:
3017         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
3018
3019 2013-05-24  Andreas Kling  <akling@apple.com>
3020
3021         Move "hover" state logic from Node to Element.
3022         <http://webkit.org/b/116757>
3023
3024         Reviewed by Antti Koivisto.
3025
3026         Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
3027         and moving it all to Element instead.
3028
3029         * dom/Node.cpp:
3030         (WebCore::Node::detach):
3031         * dom/Element.cpp:
3032         (WebCore::Element::detach):
3033
3034             Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().
3035
3036         (WebCore::Element::isUserActionElementHovered):
3037         (WebCore::Element::setHovered):
3038         * dom/Element.h:
3039         (WebCore::Element::hovered):
3040
3041             Moved here from Node/ContainerNode.
3042
3043         * dom/UserActionElementSet.h:
3044         (WebCore::UserActionElementSet::setHovered):
3045         (WebCore::UserActionElementSet::setFlags):
3046
3047             Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
3048             of these methods eventually, so added a setFlags() helper with the tighter type.
3049
3050         * html/HTMLLabelElement.h:
3051         * html/shadow/SpinButtonElement.h:
3052
3053             Sprinkle OVERRIDE on setHovered() overrides.
3054
3055         * dom/Document.cpp:
3056         (WebCore::Document::updateHoverActiveState):
3057         * accessibility/AccessibilityNodeObject.cpp:
3058         (WebCore::AccessibilityNodeObject::isHovered):
3059         * rendering/RenderTheme.cpp:
3060         (WebCore::RenderTheme::isHovered):
3061
3062             Check if the inspected Node is an element before asking if it's hovered.
3063
3064 2013-05-25  Andreas Kling  <akling@apple.com>
3065
3066         Document::formController() should return a reference.
3067         <http://webkit.org/b/116758>
3068
3069         Reviewed by Antti Koivisto.
3070
3071         The formController() is created on demand, so return a reference instead.
3072
3073         * dom/Document.h:
3074         * dom/Document.cpp:
3075         (WebCore::Document::formController):
3076         (WebCore::Document::setStateForNewFormElements):
3077         * html/HTMLFormControlElementWithState.cpp:
3078         (WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
3079         (WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
3080         (WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
3081         (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
3082         * html/HTMLFormElement.cpp:
3083         (WebCore::HTMLFormElement::~HTMLFormElement):
3084         (WebCore::HTMLFormElement::finishParsingChildren):
3085         * html/HTMLInputElement.cpp:
3086         (WebCore::HTMLInputElement::~HTMLInputElement):
3087         (WebCore::HTMLInputElement::didMoveToNewDocument):
3088         (WebCore::HTMLInputElement::checkedRadioButtons):
3089
3090 2013-05-25  Sergio Villar Senin  <svillar@igalia.com>
3091
3092         Reducing CSS code duplication in declaration list error recovery
3093         https://bugs.webkit.org/show_bug.cgi?id=115157
3094
3095         Reviewed by Andreas Kling.
3096
3097         From Blink r148974 by <serya@chromium.org>
3098
3099         Refactor "invalid_block_list error | /* empty */" in a new
3100         decl_list_recovery rule that allows to remove 4 redundant rules.
3101
3102         No new test required as we're just refactoring code, no new behaviour.
3103
3104         * css/CSSGrammar.y.in:
3105
3106 2013-05-24  Ryosuke Niwa  <rniwa@webkit.org>
3107
3108         Build fix after r150664.
3109
3110         * bindings/scripts/test/JS/JSTestObj.cpp:
3111         (WebCore):
3112
3113 2013-05-24  Sergio Villar Senin  <svillar@igalia.com>
3114
3115         Fixing invalid block recovery in some declaration list.
3116         https://bugs.webkit.org/show_bug.cgi?id=115159
3117
3118         Reviewed by Darin Adler.
3119
3120         From Blink r148889 by <serya@chromium.org>
3121
3122         Improves the detection of some invalid block declarations inside a
3123         declaration list. This allows the parser not to completely discard
3124         a whole declaration list that contains an invalid block. In
3125         particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
3126         new test added by this change.
3127
3128         Test: fast/css/parsing-invalid-block-recovery.html
3129
3130         * css/CSSGrammar.y.in:
3131
3132
3133 2013-05-24  Beth Dakin  <bdakin@apple.com>
3134
3135         DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
3136         https://bugs.webkit.org/show_bug.cgi?id=116749
3137         -and corresponding-
3138         <rdar://problem/13886753>
3139
3140         Reviewed by Simon Fraser.
3141
3142         Only start m_paintRelatedMilestonesTimer if we have actually painted.
3143         * rendering/RenderLayerCompositor.cpp:
3144         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
3145
3146 2013-05-24  Anders Carlsson  <andersca@apple.com>
3147
3148         Fix Windows build.
3149
3150         * WebCore.vcproj/WebCore.vcproj:
3151         * WebCore.vcxproj/WebCore.vcxproj:
3152         * WebCore.vcxproj/WebCore.vcxproj.filters:
3153
3154 2013-05-24  Tim Horton  <timothy_horton@apple.com>
3155
3156         Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
3157         https://bugs.webkit.org/show_bug.cgi?id=116744
3158         <rdar://problem/13973514>
3159
3160         Reviewed by Simon Fraser.
3161
3162         * WebCore.exp.in: Export FrameView::resumeAnimatingImages.
3163         * page/FrameView.cpp:
3164         (WebCore::FrameView::setIsInWindow):
3165         (WebCore::FrameView::resumeAnimatingImages):
3166         Factor the code to restart animated images out of frameView::setIsInWindow.
3167
3168         * page/FrameView.h:
3169         (FrameView):
3170
3171 2013-05-24  Anders Carlsson  <andersca@apple.com>
3172
3173         Move history property list writer to WebKit
3174         https://bugs.webkit.org/show_bug.cgi?id=116746
3175
3176         Reviewed by Tim Horton.
3177
3178         Remove files from the Xcode project and remove symbols that now live in WebKit.
3179
3180         * WebCore.exp.in:
3181         * WebCore.xcodeproj/project.pbxproj:
3182
3183 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3184
3185         Global constructors exposed in worker environment have wrong attributes
3186         https://bugs.webkit.org/show_bug.cgi?id=116708
3187
3188         Reviewed by Geoffrey Garen.
3189
3190         Fix JSC bindings generator so that Global constructors exposed in worker environment
3191         have the following attributes:
3192         { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
3193
3194         This is now consistent with global constructors on DOMWindow and with the Web IDL
3195         specification:
3196         http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces
3197
3198         Test: fast/js/global-constructors-attributes-worker.html
3199
3200         * bindings/scripts/CodeGeneratorJS.pm:
3201         (GenerateAttributesHashTable):
3202
3203 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3204
3205         Remove custom code for webkitAudioContext global constructor getter
3206         https://bugs.webkit.org/show_bug.cgi?id=116530
3207
3208         Reviewed by Geoffrey Garen.
3209
3210         Get rid of custom code for webkitAudioContext global constructor getter. The
3211         global DOMWindow attribute is now automatically generated by leveraging support
3212         for [EnabledAtRuntime] extended attribute and the existing methods in
3213         RuntimeEnabledFeatures class.
3214
3215         No new tests, no behavior change.
3216
3217         * GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
3218         * Modules/webaudio/AudioContext.idl:
3219         Remove [NoInterfaceObject] extended attribute so that the global constructor is
3220         automatically generated instead of automatically added. Add [EnabledAtRuntime]
3221         extended attribute since this global constructor can be disabled at runtime and
3222         so that we can getter rid of the [CustomGetter] for the corresponding global
3223         constructor. Use [InterfaceName] extended attribute so that the interface name
3224         matches the global constructor on DOMWindow (webkitAudioContext).
3225
3226         * Target.pri: Remove JSDOMWindowWebAudioCustom.*.
3227         * UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
3228         * WebCore.exp.in: Export additional symbol.
3229         * WebCore.order: Export additional symbol.
3230         * WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
3231         * WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
3232         * WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
3233         * WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
3234         * bindings/generic/RuntimeEnabledFeatures.h:
3235         (WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
3236         * bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
3237         * bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
3238         the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
3239         bindings generator now.
3240         * page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
3241         generated.
3242         * page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
3243         in RuntimeEnabledFeatures now.
3244
3245 2013-05-24  Seokju Kwon  <seokju.kwon@gmail.com>
3246
3247         [AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
3248         https://bugs.webkit.org/show_bug.cgi?id=116712
3249
3250         Reviewed by Andreas Kling.
3251
3252         renderView is used when ACCELERATED_COMPOSITING is enabled.
3253         So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).
3254
3255         No new tests, no behavior change.
3256
3257         * page/FrameView.cpp:
3258         (WebCore::FrameView::setFrameRect):
3259
3260 2013-05-24  Thomas Deniau  <deniau@apple.com>
3261
3262         Add more lines to the context during Dictionary lookups
3263         https://bugs.webkit.org/show_bug.cgi?id=115256
3264
3265         Reviewed by Ryosuke Niwa.
3266
3267         No new tests - no new functionality.
3268
3269         * WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
3270         to call previousLinePosition(), nextLinePosition(), startOfLine() and
3271         endOfLine() in WebPageMac.mm when determining the context while looking
3272         up a dictionary definition. These symbols used to be exported for iOS
3273         only, export them on the desktop too.
3274
3275 2013-05-24  Anders Carlsson  <andersca@apple.com>
3276
3277         Remove PagePopup code
3278         https://bugs.webkit.org/show_bug.cgi?id=116732
3279
3280         Reviewed by Andreas Kling.
3281
3282         Remove all page popup code.
3283
3284         * GNUmakefile.list.am:
3285         * WebCore.xcodeproj/project.pbxproj:
3286         * dom/ContextFeatures.cpp:
3287         * dom/ContextFeatures.h:
3288         * loader/EmptyClients.h:
3289         * page/ChromeClient.h:
3290         * page/DOMWindowPagePopup.cpp: Removed.
3291         * page/DOMWindowPagePopup.h: Removed.
3292         * page/DOMWindowPagePopup.idl: Removed.
3293         * page/PagePopup.h: Removed.
3294         * page/PagePopupClient.cpp: Removed.
3295         * page/PagePopupClient.h: Removed.
3296         * page/PagePopupController.cpp: Removed.
3297         * page/PagePopupController.h: Removed.
3298         * page/PagePopupController.idl: Removed.
3299         * page/PagePopupDriver.h: Removed.
3300         * testing/Internals.cpp:
3301         (WebCore::Internals::resetToConsistentState):
3302         (WebCore):
3303         * testing/Internals.h:
3304         (WebCore):
3305         (Internals):
3306         * testing/Internals.idl:
3307         * testing/MockPagePopupDriver.cpp: Removed.
3308         * testing/MockPagePopupDriver.h: Removed.
3309
3310 2013-05-24  Jer Noble  <jer.noble@apple.com>
3311
3312         Mac: Set the default audio buffer size to a large value for <video> elements.
3313         https://bugs.webkit.org/show_bug.cgi?id=116342
3314
3315         Reviewed by Eric Carlson.
3316         Roll-in rubber stamped by Eric Carlson.
3317
3318         To enable power savings by waking up the audio hardware less often, set the
3319         requested buffer frame size to a large value, such as 4096. Since this results
3320         in approximately 100ms worth of buffer, set the buffer size to a much lower
3321         value when playing WebAudio, which is much more sensitive to latency than video
3322         or audio elements.
3323
3324         Introduce a new class, AudioSessionManager, as well as a helper class,
3325         AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
3326         nodes will create and retain a token, and release the token in their destructor.
3327         This allows the AudioSessionManager to track how many of what type of audio-
3328         generating objects are in existence.
3329
3330         This requires implementing AudioSession for Mac platforms. Move the implementation
3331         for retrieving the hardware sample rate and setting the buffer duration into
3332         AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.
3333
3334         Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
3335         as the callers really want to specify a buffer size, not a buffer duration. On iOS,
3336         where the available API requires a duration, perform the conversion from duration to
3337         size on behalf of the caller.
3338
3339         However, since the original version of this patch caused media test
3340         failures on the Mac ML and Lion bots, only enable the buffer size
3341         change for OS X > ML.
3342
3343         * html/HTMLMediaElement.h:  Add a AudioSessionManagerToken member.
3344         * html/HTMLMediaElement.cpp:
3345         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
3346         * platform/audio/AudioSession.cpp:
3347         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
3348         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
3349         * platform/audio/AudioSession.h:
3350         * platform/audio/AudioSessionManager.cpp:
3351         (AudioSessionManagerToken::create): Simple factory method.
3352         (AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
3353         (AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
3354         (AudioSessionManager::sharedManager): Simple singleton method.
3355         (AudioSessionManager::AudioSessionManager): Simple constructor.
3356         (AudioSessionManager::has): Return whether the type is present.
3357         (AudioSessionManager::incrementCount): Increment, then call updateSessionState()
3358         (AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
3359         (AudioSessionManager::updateSessionState): Stub, does nothing.
3360         * platform/audio/AudioSessionManager.h:
3361         * platform/audio/ios/AudioDestinationIOS.cpp:
3362         (WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
3363         * platform/audio/ios/AudioSessionIOS.mm:
3364         (WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
3365         (WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
3366         * platform/audio/mac/AudioDestinationMac.cpp:
3367         (WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
3368         (WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
3369         (WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
3370         * platform/audio/mac/AudioDestinationMac.h:
3371         * platform/audio/mac/AudioSessionMac.cpp: Added.
3372         (WebCore::defaultDevice): Added, returns the default audio device.
3373         (WebCore::AudioSession::AudioSession): Simple constructor.
3374         (WebCore::AudioSession::~AudioSession): Simple destructor.
3375         (WebCore::AudioSession::category): Stub, unimplemented.
3376         (WebCore::AudioSession::setCategory): Ditto.
3377         (WebCore::AudioSession::categoryOverride): Ditto.
3378         (WebCore::AudioSession::setCategoryOverride): Ditto.
3379         (WebCore::AudioSession::numberOfOutputChannels): Ditto.
3380         (WebCore::AudioSession::setActive): Ditto.
3381         (WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
3382         (WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
3383         (WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
3384         * platform/audio/mac/AudioSessionManagerMac.cpp:
3385         (AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
3386         * WebCore.xcodeproj/project.pbxproj: Add the new files to the project.
3387
3388 2013-05-24  Alberto Garcia  <agarcia@igalia.com>
3389
3390         Path: upstream the missing bits from the BlackBerry port
3391         https://bugs.webkit.org/show_bug.cgi?id=116658
3392
3393         Reviewed by Xan Lopez.
3394
3395         PathBlackBerry was upstreamed a while ago (r144612) but a few bits
3396         were missing from the cross-platform code.
3397
3398         * platform/graphics/Path.cpp:
3399         (WebCore::Path::addPathForRoundedRect):
3400         * platform/graphics/Path.h:
3401         (Graphics):
3402         (Path):
3403
3404 2013-05-24  Noam Rosenthal  <noam@webkit.org>
3405
3406         WebProcess is crashing on http://achicu.github.io/css-presentation when direct pattern compositing is enabled
3407         https://bugs.webkit.org/show_bug.cgi?id=115135
3408
3409         Reviewed by Antti Koivisto.
3410
3411         Issue is invoked when there is a visibility:hidden layer with a non-compositable
3412         background image (e.g. a radial gradient).
3413         The layer is treated as a no-contents layer because of its visibility, however
3414         updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
3415         with direct background-image compositing.
3416
3417         Fixed by returning early from updating directly composited contents for layers
3418         with hidden contents.
3419
3420         Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html
3421
3422         * rendering/RenderLayerBacking.cpp:
3423         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
3424         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
3425         (WebCore::RenderLayerBacking::paintsChildren):
3426         (WebCore::RenderLayerBacking::isDirectlyCompositedImage):
3427
3428 2013-05-24  Robert Hogan  <robert@webkit.org>
3429
3430         Refactor shouldAddBorderPaddingMargin()
3431         https://bugs.webkit.org/show_bug.cgi?id=98803
3432
3433         Reviewed by Ryosuke Niwa.
3434
3435         Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
3436         for the sake of concision.
3437
3438         No new tests, refactoring.
3439
3440         * rendering/RenderBlockLineLayout.cpp:
3441         (WebCore::shouldAddBorderPaddingMargin):
3442         (WebCore::inlineLogicalWidth):
3443
3444 2013-05-24  Xiaobo Wang  <xiaobwang@blackberry.com>
3445
3446         [BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
3447         https://bugs.webkit.org/show_bug.cgi?id=116654
3448
3449         Reviewed by Carlos Garcia Campos.
3450
3451         PR 331552.
3452         Internally reviewed and amended by Arvid Nilsson.
3453
3454         No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
3455         The instance of GraphicsContext3D has already been destroyed but
3456         WebGLLayerWebKitThread is not aware of that. This is because compositor
3457         layer of the WebGL graphics context was referenced outside the context.
3458         So when destructing GraphicsContext3D the compositing layer was not
3459         destructed.
3460         Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
3461         after releasing the compositor layer, so that it won't be de-referenced
3462         again later.
3463
3464         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
3465         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3466         * platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
3467         (WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
3468         (WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
3469         (WebCore):
3470         * platform/graphics/blackberry/WebGLLayerWebKitThread.h:
3471         (WebGLLayerWebKitThread):
3472
3473 2013-05-24  Andreas Kling  <akling@apple.com>
3474
3475         Typing in Safari's unified field causes unnecessary web content repaints.
3476         <http://webkit.org/b/116703>
3477
3478         Reviewed by Andy Estes.
3479
3480         Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
3481         a string occurs in the page, but doesn't try to mark the occurrences.
3482         This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
3483         location bar without causing tile repaints.
3484
3485         * WebCore.exp.in:
3486         * page/Page.h:
3487         * page/Page.cpp:
3488         (WebCore::Page::findMatchesForText):
3489         (WebCore::Page::markAllMatchesForText):
3490         (WebCore::Page::countFindMatches):
3491
3492             Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
3493             matches should be marked or not. countFindMatches() is the new helper that doesn't mark.
3494
3495 2013-05-23  Beth Dakin  <bdakin@apple.com>
3496
3497         https://bugs.webkit.org/show_bug.cgi?id=116702
3498         REGRESSION (r150399): Scrollbar missing for all overflow scroll
3499         -and corresponding-
3500         <rdar://problem/13963712>
3501
3502         Reviewed by Simon Fraser.
3503
3504         This was a silly copy-paste error.
3505         * rendering/RenderLayer.cpp:
3506         (WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):
3507
3508 2013-05-23  peavo@outlook.com  <peavo@outlook.com>
3509
3510         [WinCairo] Build fails to link.
3511         https://bugs.webkit.org/show_bug.cgi?id=116671
3512
3513         Reviewed by Brent Fulgham.
3514
3515         * page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.
3516
3517 2013-05-23  Roger Fong  <roger_fong@apple.com>
3518
3519         Unreviewed. Modify WebCore for AppleWin 2010 production build.
3520
3521         * WebCore.vcxproj/WebCoreGenerated.make:
3522         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
3523         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3524
3525 2013-05-23  Yongjun Zhang  <yongjun_zhang@apple.com>
3526
3527         We need to clear main resource when detaching DocumentLoader from the frame.
3528         https://bugs.webkit.org/show_bug.cgi?id=116680
3529
3530         Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
3531         in stopLoading().  There is possibility that main resource not being cleared, and this could cause crash later
3532         since docLoader could still receive resource callbacks.  To avoid that, we can remove docLoader from main resource's
3533         client set in detachFromFrame.
3534
3535         Reviewed by Brady Eidson.
3536
3537         No new tests, this doesn't happen on OS X.
3538
3539         * loader/DocumentLoader.cpp:
3540         (WebCore::DocumentLoader::detachFromFrame):
3541         (WebCore::DocumentLoader::clearMainResource):
3542         * loader/cache/CachedResource.h: make hasClient accessible publicly.
3543         (WebCore::CachedResource::hasClient):
3544         (CachedResource):
3545
3546 2013-05-23  Mihai Maerean  <mmaerean@adobe.com>
3547
3548         assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
3549         https://bugs.webkit.org/show_bug.cgi?id=116614
3550
3551         Reviewed by David Hyatt.
3552
3553         Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
3554         the only child has column-span:all.
3555
3556         Test: fast/multicol/newmulticol/direct-child-column-span-all.html
3557
3558         * rendering/RenderBlock.cpp:
3559         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
3560
3561 2013-05-23  Anders Carlsson  <andersca@apple.com>
3562
3563         Crash in convertMainResourceLoadToDownload when downloading file by option-return
3564         https://bugs.webkit.org/show_bug.cgi?id=116451
3565
3566         Reviewed by Andreas Kling.
3567
3568         Handle MainResourceLoader being null here which will happen when loading a cached main resource.
3569
3570         * loader/DocumentLoader.cpp:
3571         (WebCore::DocumentLoader::continueAfterContentPolicy):
3572
3573 2013-05-23  Benjamin Poulain  <bpoulain@apple.com>
3574
3575         KURL::createCFURL() should return a RetainPtr<CFURLRef>
3576         https://bugs.webkit.org/show_bug.cgi?id=116644
3577
3578         Reviewed by Andreas Kling.
3579
3580         For consistency with the other createCFType() APIs in WebKit, KURL should
3581         return a RetainPtr<> instead of raw +1 CFURLRef.
3582
3583         No leak were discovered while making this change.
3584
3585         * platform/KURL.h:
3586         * platform/cf/KURLCFNet.cpp:
3587         (WebCore):
3588         (WebCore::createCFURLFromBuffer):
3589         (WebCore::KURL::createCFURL):
3590         (WebCore::KURL::fileSystemPath):
3591         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3592         (WebCore::AVFWrapper::createAssetForURL):
3593         * platform/graphics/cg/GraphicsContextCG.cpp:
3594         (WebCore::GraphicsContext::setURLForRect):
3595         * platform/mac/KURLMac.mm:
3596         (WebCore):
3597         (WebCore::KURL::operator NSURL *):
3598         (WebCore::KURL::createCFURL):
3599         * platform/network/cf/CookieJarCFNet.cpp:
3600         (WebCore::setCookiesFromDOM):
3601         (WebCore::cookiesForDOM):
3602         (WebCore::cookieRequestHeaderFieldValue):
3603         (WebCore::getRawCookies):
3604         (WebCore::deleteCookie):
3605         * platform/network/cf/DNSCFNet.cpp:
3606         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
3607         * platform/network/cf/ProxyServerCFNet.cpp:
3608         (WebCore::addProxyServersForURL):
3609         * platform/network/cf/ResourceRequestCFNet.cpp:
3610         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3611         (WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
3612         * platform/network/cf/ResourceResponseCFNet.cpp:
3613         (WebCore::ResourceResponse::cfURLResponse):
3614         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3615         (WebCore::SocketStreamHandle::SocketStreamHandle):
3616
3617 2013-05-18  Robert Hogan  <robert@webkit.org>
3618
3619         The ellipsis in a text overflow should not avoid floats
3620         https://bugs.webkit.org/show_bug.cgi?id=115746
3621
3622         Reviewed by David Hyatt.
3623
3624         When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
3625         That is to say, if there is a float in the box we overflow we should let our no-wrap text,
3626         including the ellipsis, render inside the float just as we would if overflow was hidden but
3627         a text-overflow rendering had not been specified.
3628
3629         Test: fast/css/text-overflow-ellipsis-behind-floats.html
3630
3631         * rendering/RenderBlockLineLayout.cpp:
3632         (WebCore::RenderBlock::checkLinesForTextOverflow):
3633
3634 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3635
3636         Unreviewed, rolling out r150586.
3637         http://trac.webkit.org/changeset/150586
3638         https://bugs.webkit.org/show_bug.cgi?id=116660
3639
3640         Those constructors should be exposed on the WorkerContext, not
3641         the DOMWindow
3642
3643         * fileapi/FileReaderSync.idl:
3644         * workers/WorkerLocation.idl:
3645
3646 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3647
3648         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation
3649         https://bugs.webkit.org/show_bug.cgi?id=116660
3650
3651         Reviewed by Kentaro Hara.
3652
3653         Remove [NoInterfaceObject] from FileReaderSync and WorkerLocation to match their
3654         respective specifications:
3655         - http://dev.w3.org/2006/webapi/FileAPI/#FileReaderSync
3656         - http://dev.w3.org/html5/workers/#workerlocation
3657
3658         No new tests, covered by existing tests.
3659
3660         * fileapi/FileReaderSync.idl:
3661         * workers/WorkerLocation.idl:
3662
3663 2013-05-23  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3664
3665         Remove special case for MessagePortArray from bindings generator
3666         https://bugs.webkit.org/show_bug.cgi?id=116653
3667
3668         Reviewed by Kentaro Hara.
3669
3670         Use MessagePort[] instead of MessagePortArray type in the IDL as MessagePortArray
3671         is not defined on IDL side. This allows us to remove the special case for
3672         MessagePortArray from the bindings generator.
3673
3674         No new tests, no behavior change.
3675
3676         * bindings/js/JSMessageEventCustom.cpp:
3677         (WebCore::JSMessageEvent::data):
3678         * bindings/scripts/CodeGeneratorJS.pm:
3679         (NativeToJSValue): Remove special case for MessagePortArray.
3680         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
3681         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.h:
3682         (WebDOMTestSerializedScriptValueInterface):
3683         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
3684         (webkit_dom_test_serialized_script_value_interface_get_property):
3685         (webkit_dom_test_serialized_script_value_interface_class_init):
3686         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
3687         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3688         (WebCore::jsTestSerializedScriptValueInterfacePorts):
3689         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
3690         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
3691         * bindings/scripts/test/TestSerializedScriptValueInterface.idl: Replace MessagePortArray
3692         by MessagePort[].
3693         * dom/MessageEvent.h:
3694         (WebCore::MessageEvent::ports): The method should return a Vector, not a Vector*
3695         as the array on JavaScript side is not nullable.
3696         * dom/MessageEvent.idl: Replace MessagePortArray by MessagePort[].
3697
3698 2013-05-23  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3699
3700         [EFL] Back, Forward and Stop should be hidden in context menu
3701         https://bugs.webkit.org/show_bug.cgi?id=116615
3702
3703         Reviewed by Christophe Dumez.
3704
3705         Context menu items: Back, Forward, Stop, Reload, should be shown only when
3706         they are able to perform action.
3707
3708         No new tests - no new functionality.
3709
3710         * page/ContextMenuController.cpp:
3711         (WebCore::ContextMenuController::populate):
3712
3713 2013-05-22  Dean Jackson  <dino@apple.com>
3714
3715         Rolling out r150555. It borked about 30 media tests.
3716
3717         * WebCore.xcodeproj/project.pbxproj:
3718         * html/HTMLMediaElement.cpp:
3719         (WebCore::HTMLMediaElement::HTMLMediaElement):
3720         * html/HTMLMediaElement.h:
3721         * platform/audio/AudioSession.cpp:
3722         (WebCore):
3723         (WebCore::AudioSession::AudioSession):
3724         (WebCore::AudioSession::preferredBufferDuration):
3725         (WebCore::AudioSession::setPreferredBufferDuration):
3726         * platform/audio/AudioSession.h:
3727         * platform/audio/AudioSessionListener.h:
3728         (AudioSessionListener):
3729         * platform/audio/AudioSessionManager.cpp: Removed.
3730         * platform/audio/AudioSessionManager.h: Removed.
3731         * platform/audio/ios/AudioDestinationIOS.cpp:
3732         (WebCore::AudioDestinationIOS::configure):
3733         * platform/audio/ios/AudioSessionIOS.mm:
3734         (WebCore::AudioSession::preferredBufferDuration):
3735         (WebCore::AudioSession::setPreferredBufferDuration):
3736         * platform/audio/mac/AudioDestinationMac.cpp:
3737         (WebCore::AudioDestination::hardwareSampleRate):
3738         (WebCore::AudioDestinationMac::AudioDestinationMac):
3739         (WebCore::AudioDestinationMac::configure):
3740         * platform/audio/mac/AudioDestinationMac.h:
3741         (AudioDestinationMac):
3742         * platform/audio/mac/AudioSessionMac.cpp: Removed.
3743         * platform/audio/mac/AudioSessionManagerMac.cpp: Removed.
3744
3745 2013-05-20  Jeffrey Pfau  <jpfau@apple.com>
3746
3747         Active DOM object resumption should match reason for suspending
3748         https://bugs.webkit.org/show_bug.cgi?id=116476
3749
3750         Add a reason to the arguments for resuming active DOM object and
3751         scheduled tasks and ensure that it matches the suspend reason before
3752         actually resuming the objects.
3753
3754         Reviewed by Joseph Pecoraro.
3755
3756         No new tests, no change in functionality.
3757
3758         * bindings/js/PageScriptDebugServer.cpp:
3759         (WebCore::PageScriptDebugServer::setJavaScriptPaused): Add matching resume reason
3760         * dom/Document.cpp:
3761         (WebCore::Document::resumeActiveDOMObjects): Check for matching resume reason
3762         (WebCore::Document::resumeScheduledTasks): Check for matching resume reason
3763         * dom/Document.h:
3764         (Document):
3765         * dom/ScriptExecutionContext.cpp:
3766         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects): Check for matching resume reason
3767         * dom/ScriptExecutionContext.h:
3768         (ScriptExecutionContext):
3769         (WebCore::ScriptExecutionContext::reasonForSuspendingActiveDOMObjects): Expose suspend reason to subclasses
3770         * history/CachedFrame.cpp:
3771         (WebCore::CachedFrameBase::restore): Add matching resume reason
3772         * page/Frame.cpp:
3773         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Add matching resume reason
3774         * page/PageGroupLoadDeferrer.cpp:
3775         (WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer): Add matching resume reason
3776
3777 2013-05-22  Dean Jackson  <dino@apple.com>
3778
3779         Don't snapshot plugins that can't be snapshotted
3780         https://bugs.webkit.org/show_bug.cgi?id=116490
3781
3782         Reviewed by Tim Horton.
3783
3784         Some plugins, such as QuickTime, don't support snapshotting. We're
3785         planning on another way to capture snapshots, but in the meantime make
3786         sure that they don't fail to initialise because they were told to
3787         not use accelerated rendering.
3788
3789         * WebCore.exp.in: Export restartSnapshottedPlugin so that it can be used from WK2.
3790         * html/HTMLPlugInImageElement.cpp:
3791         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Don't set the play state before restarting.
3792         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Make sure we indicated that this snapshotted plugin was clicked.
3793         * html/HTMLPlugInImageElement.h: Move restartSnapshottedPlugin from protected to public.
3794         * rendering/RenderSnapshottedPlugIn.cpp:
3795         (WebCore::RenderSnapshottedPlugIn::handleEvent): Don't set play state here. Let the restart functions do it.
3796
3797 2013-05-22  Max Vujovic  <mvujovic@adobe.com>
3798
3799         [CSS Shaders] valueForCustomFilterTransformParameter should check that renderer is a RenderBox
3800         https://bugs.webkit.org/show_bug.cgi?id=116464
3801
3802         Reviewed by Alexandru Chiculita.
3803
3804         If the renderer is not a RenderBox, we just use a zero size to compute the transform,
3805         like in CSSComputedStyleDeclaration::computedTransform.
3806
3807         Test: css3/filters/custom/custom-filter-crash-inline-computed-style.html
3808
3809         * css/CSSComputedStyleDeclaration.cpp:
3810         (WebCore::valueForCustomFilterTransformParameter):
3811
3812 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3813
3814         Fix assertion in the getComputedStyle-background-shorthand.html test
3815         https://bugs.webkit.org/show_bug.cgi?id=116639
3816
3817         Reviewed by Ryosuke Niwa.
3818
3819         getComputedStyle-background-shorthand.html was asserting under the newly added
3820         code in willBeRemovedFromTree(). The assertion was caused by too many calls to
3821         FrameView::removeSlowRepaintObject(), which happened because we called it for
3822         RenderTexts, which share style with their parent renderer.
3823         
3824         RenderText overrides styleWillChange() to do nothing, so we never
3825         call add/removeSlowRepaintObject() for them. Thus we should also skip this
3826         work in willBeRemovedFromTree() for RenderTexts.
3827
3828         * rendering/RenderObject.cpp:
3829         (WebCore::RenderObject::willBeRemovedFromTree):
3830
3831 2013-05-22  Bem Jones-Bey  <bjonesbe@adobe.com>
3832
3833         Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingLayer
3834         https://bugs.webkit.org/show_bug.cgi?id=116626
3835
3836         Reviewed by David Hyatt.
3837
3838         This is a port of a Blink bug fix by Emil Eklund.
3839
3840         Account for saturated estimated position in RenderBlock::layoutBlockChild.
3841
3842         If the estimated top position is saturated the comparison with oldLogicalTop
3843         might yield a false negative as adding and removing margins, borders etc from
3844         a saturated number might yield incorrect results. If this is the case always
3845         mark for layout.
3846
3847         Minimal test case impractical. See bug for raw fuzzer test case.
3848
3849         * platform/LayoutUnit.h:
3850         (WebCore::LayoutUnit::mightBeSaturated): Add helper method for checking whether
3851             a number might be saturated.
3852         * rendering/RenderBlock.cpp:
3853         (WebCore::RenderBlock::layoutBlockChild): Check if logicalTopEstimate is likely
3854             to be saturated and if so mark for layout.
3855
3856 2013-05-22  Benjamin Poulain  <benjamin@webkit.org>
3857
3858         Remove CSSPropertySourceData emptyCSSPropertySourceData
3859         https://bugs.webkit.org/show_bug.cgi?id=116517
3860
3861         Reviewed by Darin Adler.
3862
3863         This was added for chromium and does not seem to be used
3864         anywhere anymore.
3865
3866         * css/CSSParser.cpp:
3867         (WebCore::CSSParser::CSSParser):
3868         * css/CSSPropertySourceData.cpp:
3869         * css/CSSPropertySourceData.h:
3870
3871 2013-05-22  Csaba Osztrogonác  <ossy@webkit.org>
3872
3873         Buildfix for !ENABLE(FULLSCREEN_API) platforms.
3874
3875         Rubber-stamped by Ryosuke Niwa.
3876
3877         * rendering/RenderInline.cpp: Missing #if guard added.
3878         (WebCore::RenderInline::splitInlines):
3879
3880 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
3881
3882         Fix a typo in 150469.
3883
3884         * editing/Editor.cpp:
3885         (WebCore::dispatchEditableContentChangedEvents):
3886
3887 2013-05-22  Ryosuke Niwa  <rniwa@webkit.org>
3888
3889         REGRESSION: ASSERTION FAILED: obj->isRenderInline() || obj == this, Bad cast in WebCore::RenderBlock::createLineBoxes
3890         https://bugs.webkit.org/show_bug.cgi?id=110622
3891
3892         Reviewed by David Hyatt.
3893
3894         Merge https://chromium.googlesource.com/chromium/blink/+/998ad358eed702b873dd54697b3fa3f952e0feb7
3895
3896         Inserting an element before the fullscreened element could crash if it caused a containing inline to be split,
3897         since the splitting logic doesn't expect the fullscreened element to be wrapped in a RenderFullScreen. This patch changes
3898         inline splitting to be aware of RenderFullScreen.
3899
3900         Test: fullscreen/full-screen-inline-split-crash.html
3901
3902         * rendering/RenderInline.cpp:
3903         (WebCore::RenderInline::splitInlines):
3904
3905 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3906
3907         Fix issues with focus rings on search fields
3908         https://bugs.webkit.org/show_bug.cgi?id=116591
3909
3910         Reviewed by Darin Adler.
3911         
3912         On a future OS, the rect returned by _focusRingVisibleRect should
3913         be in the coordinate system of the that NSView, not the base
3914         coordinate system, so fix the code that sets and reads the global
3915         focusRingClipRect variable accordingly.
3916
3917         * platform/graphics/mac/WebLayer.mm:
3918         (drawLayerContents):
3919         * platform/mac/ThemeMac.mm:
3920         (-[WebCoreFlippedView _focusRingVisibleRect]):
3921
3922 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
3923
3924         New Flickr doesn't get fast scrolling but should
3925         https://bugs.webkit.org/show_bug.cgi?id=116514
3926
3927         Reviewed by Darin Adler.
3928         
3929         RenderObject increments and decrements a counter of slow repaint objects on
3930         FrameView when it sees style changes related to background-attachment:fixed.
3931         However, it omitted to decrement the count when a renderer with a fixed background
3932         was destroyed.
3933         
3934         This caused Flickr to never fall into fast scrolling mode, since it toggled
3935         display:none on an element with a fixed background during loading, then removed
3936         the fixed background.
3937         
3938         Did some minor cleanup of #ENABLE(FAST_MOBILE_SCROLLING) crap.
3939
3940         Tests: platform/mac-wk2/tiled-drawing/slow-scrolling-background-toggle.html
3941                platform/mac-wk2/tiled-drawing/slow-scrolling-hidden-background-toggle.html
3942                platform/mac-wk2/tiled-drawing/slow-scrolling.html
3943
3944         * rendering/RenderObject.cpp:
3945         (WebCore::shouldRepaintFixedBackgroundsOnScroll):
3946         (WebCore::RenderObject::styleWillChange):
3947         (WebCore::RenderObject::willBeRemovedFromTree):
3948
3949 2013-05-22  Robert Hogan  <robert@webkit.org>
3950
3951         Need to Remove Anonymous Wrappers When All Children Become Inline
3952         https://bugs.webkit.org/show_bug.cgi?id=115687
3953
3954         Reviewed by David Hyatt.
3955
3956         Remove a simple subset of anonymous wrappers, i.e. anonymous blocks without continuations,
3957         when a block becoming float or positioned removes the need for them.
3958
3959         Test: fast/block/remove-anonymous-wrappers-when-element-changes-to-float-or-positioned.html
3960
3961         * rendering/RenderBlock.h:
3962         (RenderBlock):
3963         * rendering/RenderObject.cpp:
3964         (WebCore):
3965         (WebCore::RenderObject::removeAnonymousWrappersFromLineIfNecessary):
3966         (WebCore::RenderObject::styleWillChange):
3967         (WebCore::RenderObject::styleDidChange):
3968         * rendering/RenderObject.h:
3969         (RenderObject):
3970
3971 2013-05-22  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3972
3973         [css] Update ETextDecorations enum to TextDecorations
3974         https://bugs.webkit.org/show_bug.cgi?id=116581
3975
3976         Reviewed by Andreas Kling.
3977
3978         Currently, ETextDecorations enum uses a C-like coding style for its
3979         enumeration values, as well as a 'E' prefix that surely had some meaning
3980         in the past, but not nowadays.
3981
3982         No behavior changes, covered by existing tests.
3983
3984         * accessibility/AccessibilityRenderObject.cpp:
3985         (WebCore::AccessibilityRenderObject::hasPlainText):
3986         (WebCore::AccessibilityRenderObject::hasUnderline):
3987         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3988         (getAttributeSetForAccessibilityObject):
3989         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3990         (AXAttributeStringSetStyle):
3991         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3992         (AXAttributeStringSetStyle):
3993         * css/CSSComputedStyleDeclaration.cpp:
3994         (WebCore::renderTextDecorationFlagsToCSSValue):
3995         * css/CSSPrimitiveValueMappings.h:
3996         (WebCore::CSSPrimitiveValue::operator TextDecoration):
3997         * css/DeprecatedStyleBuilder.cpp:
3998         (WebCore::ApplyPropertyTextDecoration::applyValue):
3999         (WebCore::ApplyPropertyTextDecoration::createHandler):
4000         * editing/mac/EditorMac.mm:
4001         (WebCore::Editor::fontAttributesForSelectionStart):
4002         * platform/mac/HTMLConverter.mm:
4003         (+[WebHTMLConverter editingAttributedStringFromRange:]):
4004         * rendering/InlineTextBox.cpp:
4005         (WebCore::InlineTextBox::paint):
4006         (WebCore::InlineTextBox::paintDecoration):
4007         * rendering/InlineTextBox.h:
4008         * rendering/RenderObject.cpp:
4009         (WebCore::RenderObject::getTextDecorationColors):
4010         * rendering/style/RenderStyle.h:
4011         * rendering/style/RenderStyleConstants.h:
4012         (WebCore::operator|):
4013         (WebCore::operator|=):
4014         * rendering/style/StyleVisualData.h:
4015         (StyleVisualData):
4016         * rendering/svg/SVGInlineTextBox.cpp:
4017         (WebCore::SVGInlineTextBox::paint):
4018         (WebCore::positionOffsetForDecoration):
4019         (WebCore::thicknessForDecoration):
4020         (WebCore::findRenderObjectDefininingTextDecoration):
4021         (WebCore::SVGInlineTextBox::paintDecoration):
4022         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
4023         * rendering/svg/SVGInlineTextBox.h:
4024
4025 2013-05-22  Lori Anderson  <lori@rkymtnhi.com>
4026
4027         [GStreamer] Allow multiple log levels in media player
4028         https://bugs.webkit.org/show_bug.cgi?id=116618
4029
4030         Reviewed by Philippe Normand.
4031
4032         No new tests, just changing logging.
4033
4034         * platform/graphics/gstreamer/GStreamerUtilities.h:
4035         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
4036         (WebCore::MediaPlayerPrivateGStreamer::load):
4037         (WebCore::MediaPlayerPrivateGStreamer::pause):
4038         (WebCore::MediaPlayerPrivateGStreamer::seek):
4039         (WebCore::MediaPlayerPrivateGStreamer::setRate):
4040         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
4041
4042 2013-05-22  Beth Dakin  <bdakin@apple.com>
4043
4044         The LayoutMilestones didLayout callback sometimes fires with a milestone value of 0
4045         https://bugs.webkit.org/show_bug.cgi?id=116623
4046
4047         Reviewed by Geoffrey Garen.
4048
4049         Make sure we have actually achieved some milestones before calling didLayout().
4050         * page/FrameView.cpp:
4051         (WebCore::FrameView::performPostLayoutTasks):
4052
4053 2013-05-22  Mario Sanchez Prada  <mario.prada@samsung.com>
4054
4055         [GTK] Reimplement atk_text_get_text_*_offset for CHAR boundary
4056         https://bugs.webkit.org/show_bug.cgi?id=114870
4057
4058         Reviewed by Martin Robinson.
4059
4060         Re-implement this functions without using GailTextUtil nor Pango.
4061
4062         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
4063         (webkitAccessibleTextGetChar): New function.
4064         (webkitAccessibleTextGetTextForOffset): Call the new function for CHAR.
4065
4066 2013-05-22  Antoine Quint  <graouts@apple.com>
4067
4068         [Mac] Captions menu isn't internationalized, doesn't use rtl layout for rtl languages
4069         https://bugs.webkit.org/show_bug.cgi?id=116605
4070
4071         Reviewed by Eric Carlson.
4072
4073         Ensure that rtl languages are properly recognized by the captions menu such that text
4074         layout and alignment is natural.
4075
4076         * css/mediaControls.css:
4077         (::-webkit-media-controls):
4078         Remove the forced "direction: ltr" property which was forcing all layout to be
4079         left-to-right.
4080
4081         * css/mediaControlsQuickTime.css:
4082         (video::-webkit-media-controls-closed-captions-track-list):
4083         Remove the forced "text-align: left" property which was forcing all caption
4084         titles to be left-aligned.
4085
4086         (video::-webkit-media-controls-closed-captions-track-list h3):
4087         Use "-webkit-margin-start" instead of "padding-left" to position the heading
4088         such that it adds the margin on the left for ltr languages and on the right
4089         for rtl languages.
4090
4091         (video::-webkit-media-controls-closed-captions-track-list li):
4092         Set "position: relative" such that the ::before pseudo-class can use "position: absolute"
4093         to position itself relative to the caption title rather than the list element.
4094
4095         (video::-webkit-media-controls-closed-captions-track-list li.selected::before):
4096         (video::-webkit-media-controls-closed-captions-track-list li.selected:hover::before):
4097         Make the checkmarks a ::before pseudo-class rather than a background-image such that
4098         we may control its positioning using the internationlization-friendly "-webkit-margin-start"
4099         property.
4100
4101         * html/shadow/MediaControlElements.cpp:
4102         (WebCore::MediaControlClosedCaptionsContainerElement::create):
4103         Set the "dir" attribute to "auto" such that rtl languages are correctly handled. This
4104         means that the first string displayed within the captions container, currently the
4105         "Subtitles" <h3> element, defines the direction for the whole container. It is therefore
4106         crucial that this string is properly localized in rtl languages as falling back to
4107         english would mean the entire caption container is using ltr.
4108
4109 2013-05-22  Hugo Parente Lima  <hugo.lima@openbossa.org>
4110
4111         WebCore fails to compile with -Werror=maybe-uninitialized on GCC 4.8.0
4112         https://bugs.webkit.org/show_bug.cgi?id=116340
4113
4114         Reviewed by Christophe Dumez.
4115
4116         No new tests, just a simple build fix.
4117
4118         * inspector/InspectorDOMStorageAgent.cpp:
4119         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem): Init frame variable.
4120         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem): Init frame variable.
4121
4122 2013-05-22  Christophe Dumez  <ch.dumez@sisa.samsung.com>
4123
4124         Have IDL interface names match their global constructor
4125         https://bugs.webkit.org/show_bug.cgi?id=116520