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