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