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