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