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