Need a method to close all idle localstorage databases immediately.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-02  Yongjun Zhang  <yongjun_zhang@apple.com>
2
3         Need a method to close all idle localstorage databases immediately.
4         https://bugs.webkit.org/show_bug.cgi?id=103469
5
6         Reviewed by David Kilzer.
7
8         Add a new PageGroup method closeIdleLocalStorageDatabases, which walks through
9         all local storage areas that don't have document referencing to them and closes
10         their underlying databases.
11
12         Test: storage/domstorage/localstorage/close-idle-localstorage-databases-immediately.html
13
14         * WebCore.exp.in:
15         * page/PageGroup.cpp:
16         (WebCore::PageGroup::clearLocalStorageForOrigin):
17         (WebCore):
18         (WebCore::PageGroup::closeIdleLocalStorageDatabases): walking through all idle local storages and
19             closing their databases.
20         * page/PageGroup.h:
21         (PageGroup):
22         * storage/StorageArea.h:
23         (WebCore::StorageArea::closeDatabaseIfIdle):
24         * storage/StorageAreaImpl.cpp:
25         (WebCore::StorageAreaImpl::closeDatabaseIfIdle): close the database if it is idle.
26         (WebCore):
27         * storage/StorageAreaImpl.h:
28         (StorageAreaImpl):
29         * storage/StorageNamespace.h:
30         (StorageNamespace):
31         * storage/StorageNamespaceImpl.cpp:
32         (WebCore::StorageNamespaceImpl::closeIdleLocalStorageDatabases):
33         (WebCore):
34         * storage/StorageNamespaceImpl.h:
35         (StorageNamespaceImpl):
36
37 2012-12-02  Otto Derek Cheung  <otcheung@rim.com>
38
39         [BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
40         https://bugs.webkit.org/show_bug.cgi?id=103748
41
42         Reviewed by Rob Buis.
43
44         Updating CookieJarBlackBerry::cookieEnabled and have other methods in the class call that
45         method. Also, adding null checks for document->settings().
46
47         No change in behaviour.
48
49         * loader/blackberry/CookieJarBlackBerry.cpp:
50         (WebCore::cookies):
51         (WebCore::setCookies):
52         (WebCore::cookiesEnabled):
53         (WebCore::getRawCookies):
54         (WebCore::deleteCookie):
55         (WebCore::cookieRequestHeaderFieldValue):
56
57 2012-12-02  Sheriff Bot  <webkit.review.bot@gmail.com>
58
59         Unreviewed, rolling out r136236.
60         http://trac.webkit.org/changeset/136236
61         https://bugs.webkit.org/show_bug.cgi?id=103833
62
63         [chromium] Flakey crashes in SpeechRecognitionEvent::emma
64         during GC. (Requested by mkwst on #webkit).
65
66         * Modules/speech/SpeechRecognition.cpp:
67         (WebCore::SpeechRecognition::start):
68         * Modules/speech/SpeechRecognition.h:
69         (SpeechRecognition):
70         * Modules/speech/SpeechRecognitionEvent.cpp:
71         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
72         * Modules/speech/SpeechRecognitionEvent.h:
73         (SpeechRecognitionEventInit):
74         (SpeechRecognitionEvent):
75         (WebCore::SpeechRecognitionEvent::resultIndex):
76         * Modules/speech/SpeechRecognitionEvent.idl:
77         * Modules/speech/SpeechRecognitionResult.cpp:
78         (WebCore::emmaQualifiedName):
79         (WebCore):
80         (WebCore::SpeechRecognitionResult::emma):
81         * Modules/speech/SpeechRecognitionResult.h:
82         (WebCore):
83         (WebCore::SpeechRecognitionResult::final):
84         (SpeechRecognitionResult):
85         * Modules/speech/SpeechRecognitionResult.idl:
86         * WebCore.gypi:
87         * bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp.
88         (WebCore):
89         (WebCore::V8SpeechRecognitionResult::opaqueRootForGC):
90
91 2012-12-01  Sheriff Bot  <webkit.review.bot@gmail.com>
92
93         Unreviewed, rolling out r136015.
94         http://trac.webkit.org/changeset/136015
95         https://bugs.webkit.org/show_bug.cgi?id=103821
96
97         Did not heal performance bot and caused other performance
98         regressions (Requested by abarth on #webkit).
99
100         * bindings/scripts/CodeGeneratorV8.pm:
101         (GenerateHeader):
102
103 2012-12-01  Xiaobo Wang  <xiaobo.wang@torchmobile.com.cn>
104
105         DRT - crashed in WebCore::SearchFieldCancelButtonElement::defaultEventHandler
106         https://bugs.webkit.org/show_bug.cgi?id=103592
107
108         Reviewed by Kent Tamura.
109
110         The crash happened when the search field cancel button handles mouseout
111         event after the search input was detached. When it happens the input
112         element returned from shadowHost() is null, need to check the pointer
113         before dereferencing.
114         InputFieldSpeechButton and SearchFieldResultsButtonElement have the
115         similar issue.
116
117         No new tests. The patch fixes the following test on BlackBerry platform.
118         Test: fast/forms/search-delete-while-cancel-button-clicked.html
119
120         * html/shadow/TextControlInnerElements.cpp:
121         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
122         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
123         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
124         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
125         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
126         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
127
128 2012-11-30  Mike West  <mkwst@chromium.org>
129
130         CSP 1.1: Make the CSP_NEXT flag runtime enabled.
131         https://bugs.webkit.org/show_bug.cgi?id=103652
132
133         Reviewed by Adam Barth.
134
135         Content Security Policy 1.1 continues to live behind the CSP_NEXT flag,
136         this patch adds another layer on top of that in order to enable runtime
137         decisions about whether it should be active.
138
139         * bindings/generic/RuntimeEnabledFeatures.cpp:
140         (WebCore):
141         * bindings/generic/RuntimeEnabledFeatures.h:
142         (RuntimeEnabledFeatures):
143         (WebCore::RuntimeEnabledFeatures::experimentalContentSecurityPolicyFeaturesEnabled):
144         (WebCore::RuntimeEnabledFeatures::setExperimentalContentSecurityPolicyFeaturesEnabled):
145             Adds methods in order to correctly handle enabling and disabling
146             CSP 1.1 features.
147         * dom/Document.idl:
148             Gate the 'document.securityPolicy' object on the runtime flag.
149         * page/ContentSecurityPolicy.cpp:
150         (WebCore::CSPDirectiveList::addDirective):
151             Check that experimental features are runtime enabled before
152             processing 1.1 directives.
153         (WebCore::ContentSecurityPolicy::experimentalFeaturesEnabled):
154         (WebCore):
155         * page/ContentSecurityPolicy.h:
156             Adds a new method which checks against the runtime flag to determine
157             whether CSP 1.1 features are enabled.
158
159 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
160
161         Avoid calling into NSUserDefaults every time we start a scroll
162         https://bugs.webkit.org/show_bug.cgi?id=103804
163
164         Reviewed by Dan Bernstein.
165
166         Cache the NSScrollAnimationEnabled preference to avoid
167         hitting NSUserDefaults every time we start scrolling.
168
169         * platform/mac/ScrollAnimatorMac.mm:
170         (WebCore::scrollAnimationEnabledForSystem):
171
172 2012-11-30  Beth Dakin  <bdakin@apple.com>
173
174         https://bugs.webkit.org/show_bug.cgi?id=103790
175         The LayerPool m_pruneTimer should have a longer delay
176
177         Reviewed by Simon Fraser.
178
179         A 1 second delay is more appropriate here.
180         * platform/graphics/ca/mac/LayerPool.mm:
181         (WebCore::LayerPool::schedulePrune):
182
183 2012-11-30  Jer Noble  <jer.noble@apple.com>
184
185         Unreviewed Windows build fix.
186
187         Add a default: entry to an case statement to fix a build error when compiled in VS2005.
188
189         * html/MediaController.cpp:
190         (MediaController::playbackState):
191
192 2012-11-30  Jer Noble  <jer.noble@apple.com>
193
194         Add support for the 'unpause()' method on MediaController.
195         https://bugs.webkit.org/show_bug.cgi?id=103751
196
197         Reviewed by Eric Carlson.
198
199         The MediaController spec has been updated to add an unpause() method
200         which is functionally identical to the old play() method, and changes
201         the semantics of play() to call play() on the underlying slaved media
202         elements. The spec also added a playbackState() method, returning a
203         string representing the last calculated playback state.
204
205         Test: media/media-controller-unpause.html
206
207         * html/MediaController.cpp:
208         (MediaController::unpause): Renamed from play().
209         (MediaController::play): Added. Same as unpause(), but also call
210             play() on slaved media elements.
211         (playbackStateWaiting): Static string accessor.
212         (playbackStatePlaying): Ditto.
213         (playbackStateEnded): Ditto.
214         (MediaController::playbackState): Added. Returns string value of
215             m_playbackState.
216         * html/MediaController.h:
217         * html/MediaController.idl:
218
219 2012-11-30  Julien Chaffraix  <jchaffraix@webkit.org>
220
221         [CSS Grid Layout] Align the grid track code with the specification's production rules
222         https://bugs.webkit.org/show_bug.cgi?id=103703
223
224         Reviewed by Alexis Menard.
225
226         In order to support more of the syntax and make the code more readable, this change
227         splits following the grammar's production rules (see
228         http://dev.w3.org/csswg/css3-grid-layout/#grid-definition-columns-and-grid-definit).
229
230         Refactoring covered by existing tests.
231
232         * css/CSSComputedStyleDeclaration.cpp:
233         (WebCore::valueForGridTrackMinMax):
234         (WebCore::valueForGridTrackGroup):
235         (WebCore::valueForGridTrackList):
236         * css/CSSParser.cpp:
237         (WebCore::CSSParser::parseGridTrackList):
238         (WebCore::CSSParser::parseGridTrackGroup):
239         (WebCore::CSSParser::parseGridTrackMinMax):
240         * css/CSSParser.h:
241         * css/StyleResolver.cpp:
242         (WebCore::createGridTrackMinMax):
243         (WebCore::createGridTrackGroup):
244         (WebCore::createGridTrackList):
245         Mechanical split of the parsing, resolving and computed style code into
246         <track-list>, <track-group>, <track-minmax> and <track-breadth> parts.
247
248         * css/CSSParser.cpp:
249         (WebCore::CSSParser::parseGridBreadth):
250         Changed this function to just parse a single value (without any extra logic).
251
252         * css/StyleResolver.cpp:
253         (WebCore::createGridTrackBreadth):
254         Changed this function to take a Length as it is used to parse a <track-breadth>.
255         The goal is for it to be the low-level function createGridTrackMinmax will call on
256         each function parameter.
257
258 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
259
260         Fix potential crash when canceling animations on renderers with no node
261         https://bugs.webkit.org/show_bug.cgi?id=103784
262
263         Reviewed by Dan Bernstein.
264
265         We could crash when tearing down RenderScrollbars because we hit
266         AnimationController::cancelAnimations() for a renderer with no node.
267         The assertion already check for a null node, but the line after
268         does not, so fix that.
269
270         I tried to make a test with animations/transitions on a custom scrollbar, but was not able
271         to get it to crash.
272
273         * page/animation/AnimationController.cpp:
274         (WebCore::AnimationController::cancelAnimations):
275
276 2012-11-30  Tim Horton  <timothy_horton@apple.com>
277
278         PluginDocument fires didFinishDocumentLoadForFrame upon receiving initial bytes instead of when load completes
279         https://bugs.webkit.org/show_bug.cgi?id=103702
280         <rdar://problem/12762534>
281
282         Reviewed by Alexey Proskuryakov.
283
284         Remove the call to finish() from PluginDocumentParser::appendBytes().
285
286         This was introduced in http://trac.webkit.org/changeset/14838, when finish() wouldn't get
287         called for PluginDocuments any other way. In the time since, DocumentWriter::end() was made
288         to call finish() anyway, at the correct time (the call from appendBytes makes a PluginDocument
289         appear to be finished loading after the first bytes are received).
290
291         No new tests, because there doesn't seem to be any state in a PluginDocument that can be accessed
292         from JavaScript to determine whether or not it has finished loading.
293
294         * html/PluginDocument.cpp:
295         (WebCore::PluginDocumentParser::appendBytes):
296
297 2012-11-29  Ilya Tikhonovsky  <loislo@chromium.org>
298
299         RenderBlock minor clean-up: replace raw pointers with OwnPtrs.
300         https://bugs.webkit.org/show_bug.cgi?id=103690
301
302         Reviewed by Eric Seidel.
303
304         raw pointers were replaced with OwnPtrs.
305         Probably we also gain a small performance improvements because
306         I replaced get && remove pair with take.
307
308         * rendering/RenderBlock.cpp:
309         (WebCore):
310         (WebCore::removeBlockFromDescendantAndContainerMaps):
311         (WebCore::RenderBlock::~RenderBlock):
312         (WebCore::RenderBlock::addOverflowFromFloats):
313         (WebCore::RenderBlock::addContinuationWithOutline):
314         (WebCore::RenderBlock::paintContinuationOutlines):
315         (WebCore::RenderBlock::insertIntoTrackedRendererMaps):
316         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
317         (WebCore::RenderBlock::setDesiredColumnCountAndWidth):
318         * rendering/RenderBlock.h:
319         (WebCore):
320
321 2012-11-30  Jun Jiang  <jun.a.jiang@intel.com>
322
323         WebGL: Add a class to abstract the status of the Image in texImage2D() and texSubImage2D()
324         https://bugs.webkit.org/show_bug.cgi?id=103606
325
326         Reviewed by Kenneth Russell.
327
328         In texImage2D() and texSubImage2D() for WebGL, the status of the Image is extracted and kept in the function GraphicsContext3D::getImageData() but provides no interface or guaranteed way to use the status of the Image outside GraphicsContext3D::getImageData() safely. For example, you can not get the address of the raw Image data and operate it outside the scope of the GraphicsContext3D::getImageData() and there is at least one memory copy existed from the Image to the intermediate vector.
329        This patch refactors the code by adding a ImageExtractor class to abstract and keep the status of the Image. The lifetime and validity of Image status are determined by the lifetime of the object instead of the scope of getImageData(). It provides flexibility on future optimizations.
330
331         No new tests. It is a code refactoring patch.
332
333         * html/canvas/WebGLRenderingContext.cpp:
334         (WebCore):
335         (WebCore::WebGLRenderingContext::texImage2DImpl):
336         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
337         * platform/graphics/GraphicsContext3D.cpp:
338         (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
339         (WebCore):
340         (WebCore::GraphicsContext3D::packImageData):
341         * platform/graphics/GraphicsContext3D.h:
342         (WebCore):
343         (GraphicsContext3D):
344         (ImageExtractor):
345         (WebCore::GraphicsContext3D::ImageExtractor::extractSucceeded):
346         (WebCore::GraphicsContext3D::ImageExtractor::imagePixelData):
347         (WebCore::GraphicsContext3D::ImageExtractor::imageWidth):
348         (WebCore::GraphicsContext3D::ImageExtractor::imageHeight):
349         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceFormat):
350         (WebCore::GraphicsContext3D::ImageExtractor::imageAlphaOp):
351         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceUnpackAlignment):
352         * platform/graphics/NativeImagePtr.h:
353         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
354         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
355         (WebCore):
356         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
357         * platform/graphics/cg/GraphicsContext3DCG.cpp:
358         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
359         (WebCore):
360         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
361         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
362         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
363         (WebCore):
364         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
365         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
366         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
367         (WebCore):
368         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
369         * platform/graphics/qt/GraphicsContext3DQt.cpp:
370         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
371         (WebCore):
372         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
373         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
374         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
375         (WebCore):
376         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
377
378 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
379
380         Make RenderLayer::updateLayerPosition() private
381         https://bugs.webkit.org/show_bug.cgi?id=102624
382
383         Reviewed by Ryosuke Niwa.
384
385         Made updateLayerPosition() private. The only external caller was
386         MouseRelatedEvent::computeRelativePosition(), which has no business updating
387         layer positions. In fact it had positively dangerous behavior; doing just
388         a style update without layout, and then calling absoluteToLocal() and walking
389         layers. Fixed by having it call updateLayoutIgnorePendingStylesheets().
390         
391         This revealed a bug where event.offsetX/offsetY could be wrong in some cases.
392         fast/events/stopPropagation-submit.html does a simulated click (which has
393         client coordinates at 0,0), so the image submit coordinates were incorrectly
394         0,0. Now that we do layout before computing them, they are correctly reported
395         as being relative to the element.
396
397         * dom/MouseRelatedEvent.cpp:
398         (WebCore::MouseRelatedEvent::computeRelativePosition):
399         * rendering/RenderLayer.cpp:
400         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
401         * rendering/RenderLayer.h:
402         (RenderLayer):
403
404 2012-11-30  Simon Fraser  <simon.fraser@apple.com>
405
406         Late-loading stylesheets can cause composited layers to be blank
407         https://bugs.webkit.org/show_bug.cgi?id=103773
408
409         Reviewed by Tim Horton.
410
411         Early painting can be short-circuited in RenderBlock::paintContents() if we know a stylesheet
412         is pending, which is done to avoid a flash of unstyled content (FOUC). When the stylesheet
413         finally loaded, Document::styleResolverChanged() would try to repaint everything by calling
414         repaint() on the RenderView(). In a composited world, however, this repaint() doesn't repaint
415         composited layers.
416         
417         This was particularly prevalent on this specific URL because it failed to load
418         a CSS file from typekit.com, so Document::styleResolverChanged()
419         just did the repaint and returned (rather than doing a recalc style as would
420         happen for correctly loaded stylesheets).
421         
422         Fix by making a way to repaint all compositing layers, and calling it
423         from Document::styleResolverChanged().
424
425         No tests because this is timing-dependant.
426
427         * dom/Document.cpp:
428         (WebCore::Document::styleResolverChanged): Call repaintViewAndCompositedLayers().
429         * rendering/RenderBlock.cpp:
430         (WebCore::RenderBlock::paintContents): Fix the comment.
431         * rendering/RenderLayerCompositor.cpp: Convert repaintCompositedLayersAbsoluteRect()
432         and associated recursiveRepaintLayerRect() to allow the rect to be null, which indicates
433         that we should just repaint the entire layer, and improve their names.
434         (WebCore::RenderLayerCompositor::repaintCompositedLayers):
435         (WebCore::RenderLayerCompositor::recursiveRepaintLayer):
436         * rendering/RenderLayerCompositor.h:
437         * rendering/RenderView.cpp:
438         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): repaintCompositedLayersAbsoluteRect()
439         was renamed to repaintCompositedLayers().
440         (WebCore::RenderView::repaintViewAndCompositedLayers):
441         * rendering/RenderView.h:
442         (RenderView): repaintViewRectangle() and repaintRectangleInViewAndCompositedLayers() should not
443         be virtual. Add repaintViewAndCompositedLayers().
444
445 2012-11-30  Sheriff Bot  <webkit.review.bot@gmail.com>
446
447         Unreviewed, rolling out r136142.
448         http://trac.webkit.org/changeset/136142
449         https://bugs.webkit.org/show_bug.cgi?id=103768
450
451         break a bunch of interactive_ui_tests in chromium win
452         (Requested by zhenyao_home on #webkit).
453
454         * css/CSSComputedStyleDeclaration.cpp:
455         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
456         * css/CSSParser.cpp:
457         (WebCore::isValidKeywordPropertyAndValue):
458         (WebCore::isKeywordPropertyID):
459         (WebCore::CSSParser::parseValue):
460         * css/CSSPrimitiveValueMappings.h:
461         * css/CSSProperty.cpp:
462         (WebCore::CSSProperty::isInheritedProperty):
463         * css/CSSPropertyNames.in:
464         * css/CSSValueKeywords.in:
465         * css/StyleBuilder.cpp:
466         (WebCore::StyleBuilder::StyleBuilder):
467         * css/StyleResolver.cpp:
468         (WebCore::StyleResolver::applyProperty):
469         * rendering/InlineFlowBox.cpp:
470         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
471         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
472         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
473         * rendering/RenderRubyRun.cpp:
474         (WebCore::RenderRubyRun::layout):
475         * rendering/style/RenderStyle.cpp:
476         (WebCore::RenderStyle::diff):
477         * rendering/style/RenderStyle.h:
478         * rendering/style/RenderStyleConstants.h:
479         * rendering/style/StyleRareInheritedData.cpp:
480         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
481         (WebCore::StyleRareInheritedData::operator==):
482         * rendering/style/StyleRareInheritedData.h:
483         (StyleRareInheritedData):
484
485 2012-11-30  Joshua Bell  <jsbell@chromium.org>
486
487         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 1)
488         https://bugs.webkit.org/show_bug.cgi?id=101483
489
490         Reviewed by Tony Chang.
491
492         The IDB back end (which runs on a single thread) makes use of ScriptExecutionContext's
493         Task and facilities for cross-task posting with callbacks, and requires decorating various
494         IDB classes with "ThreadSafe" when they are not. Move towards encapsulating the tasks
495         in "Operation" classes which are IDB-operation specific.
496
497         Part 1 (this patch) retains the use of ScriptExecutionContext::Task but wraps the creation
498         and the callback function in an Operation class which will be fleshed out in later patches.
499         As an aside, a little bit of RefPtr churn is eliminated, and IDB_TRACE sprinkled in.
500
501         No new tests - just a refactor.
502
503         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
504         (IDBCursorBackendImpl::CursorIterationOperation):
505         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
506         (WebCore):
507         (IDBCursorBackendImpl::CursorAdvanceOperation):
508         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
509         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
510         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
511         (WebCore::IDBCursorBackendImpl::continueFunction):
512         (WebCore::IDBCursorBackendImpl::advance):
513         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
514         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
515         (WebCore::IDBCursorBackendImpl::prefetchContinue):
516         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
517         * Modules/indexeddb/IDBCursorBackendImpl.h:
518         (IDBCursorBackendImpl):
519         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
520         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
521         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
522         (WebCore):
523         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
524         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
525         (IDBDatabaseBackendImpl::VersionChangeOperation):
526         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
527         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
528         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
529         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
530         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
531         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
532         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
533         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
534         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
535         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
536         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
537         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
538         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
539         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
540         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
541         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
542         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
543         (IDBDatabaseBackendImpl):
544         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
545         (IDBIndexBackendImpl::OpenIndexCursorOperation):
546         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
547         (WebCore):
548         (IDBIndexBackendImpl::IndexCountOperation):
549         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
550         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
551         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
552         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
553         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
554         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
555         (WebCore::IDBIndexBackendImpl::openCursor):
556         (WebCore::IDBIndexBackendImpl::openKeyCursor):
557         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
558         (WebCore::IDBIndexBackendImpl::count):
559         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
560         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
561         (WebCore::IDBIndexBackendImpl::get):
562         (WebCore::IDBIndexBackendImpl::getKey):
563         * Modules/indexeddb/IDBIndexBackendImpl.h:
564         (WebCore::IDBIndexBackendImpl::metadata):
565         (IDBIndexBackendImpl):
566         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
567         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
568         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
569         (WebCore):
570         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
571         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
572         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
573         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
574         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
575         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
576         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
577         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
578         (IDBObjectStoreBackendImpl::CreateIndexOperation):
579         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
580         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
581         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
582         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
583         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
584         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
585         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
586         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
587         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
588         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
589         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
590         (WebCore::IDBObjectStoreBackendImpl::get):
591         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
592         (WebCore::IDBObjectStoreBackendImpl::put):
593         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
594         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
595         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
596         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
597         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
598         (WebCore::IDBObjectStoreBackendImpl::clear):
599         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
600         (WebCore::IDBObjectStoreBackendImpl::createIndex):
601         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
602         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
603         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
604         (WebCore::IDBObjectStoreBackendImpl::openCursor):
605         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
606         (WebCore::IDBObjectStoreBackendImpl::count):
607         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
608         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
609         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
610         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
611         (IDBObjectStoreBackendImpl):
612
613 2012-11-30  Tim Horton  <timothy_horton@apple.com>
614
615         (Simple)PDFPlugin: Support conversion of PostScript documents
616         https://bugs.webkit.org/show_bug.cgi?id=103289
617         <rdar://problem/10235708>
618
619         Reviewed by Dan Bernstein.
620
621         SimplePDFPlugin (and PDFPlugin) should support converting PostScript files
622         to PDF before handing them off to their respective backends.
623
624         * English.lproj/Localizable.strings:
625         * WebCore.exp.in:
626         * platform/LocalizedStrings.cpp:
627         (WebCore::postScriptDocumentTypeDescription):
628         * platform/LocalizedStrings.h:
629         Add and export postScriptDocumentTypeDescription, for PostScript files.
630
631 2012-11-30  Justin Novosad  <junov@google.com>
632
633         [Chromium] Animation updates fail when using a canvas as a CSS backround-image style with -webkit-canvas
634         https://bugs.webkit.org/show_bug.cgi?id=103643
635
636         Reviewed by Stephen White.
637
638         CanvasRenderingContext2D::didDraw was not propagating the change
639         notification to observers in the accelerated compositing case.
640         Problem fixed by adding observer notifications.
641
642         New manual test: animated-canvas-as-background.html
643
644         * html/HTMLCanvasElement.cpp:
645         (WebCore::HTMLCanvasElement::didDraw):
646         The observer notification was factored out into a separate method
647         so that it can be invoked directly for accelerated compositing.
648         (WebCore):
649         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
650         * html/HTMLCanvasElement.h:
651         (HTMLCanvasElement):
652         * html/canvas/CanvasRenderingContext2D.cpp:
653         (WebCore::CanvasRenderingContext2D::didDraw):
654         Added observer notification call to trigger repainting of elements that
655         use this canvas for their style.
656
657 2012-11-30  James Simonsen  <simonjam@chromium.org>
658
659         Report CSS as initiator instead of elements, except body
660         https://bugs.webkit.org/show_bug.cgi?id=103546
661
662         Reviewed by Tony Gentilcore.
663
664         The Resource Timing spec says the initiator should be "css" when the the load comes from a
665         url() rule in a stylesheet. Separately, WebKit reports <body background> as a CSS load, we
666         need to override that to match the spec.
667
668         Tests: http/tests/w3c/webperf/submission/resource-timing
669
670         * css/CSSCursorImageValue.cpp:
671         (WebCore::CSSCursorImageValue::cachedImage):
672         * css/CSSImageValue.cpp:
673         (WebCore::CSSImageValue::cachedImage): By default, the initiator is "css".
674         * css/CSSImageValue.h:
675         (CSSImageValue):
676         (WebCore::CSSImageValue::setInitiator): Allow users to manually override it (see body).
677         * css/StyleResolver.cpp:
678         (WebCore::StyleResolver::loadPendingImage):
679         * html/HTMLBodyElement.cpp:
680         (WebCore::HTMLBodyElement::collectStyleForPresentationAttribute): Record "body" as the initiator.
681
682 2012-11-30  James Simonsen  <simonjam@chromium.org>
683
684         Remember the CachedResourceRequest for preloads
685         https://bugs.webkit.org/show_bug.cgi?id=102995
686
687         Reviewed by Tony Gentilcore.
688
689         Without this, the initiator is lost.
690
691         Tests: http/tests/w3c/webperf/submission/resource-timing
692
693         * loader/cache/CachedResourceLoader.cpp:
694         (WebCore::CachedResourceLoader::requestResource):
695         (WebCore::CachedResourceLoader::loadResource):
696         (WebCore::CachedResourceLoader::preload):
697         (WebCore::CachedResourceLoader::checkForPendingPreloads):
698         (WebCore::CachedResourceLoader::requestPreload):
699         (WebCore::CachedResourceLoader::isPreloaded):
700         * loader/cache/CachedResourceLoader.h:
701         (CachedResourceLoader):
702         (PendingPreload):
703
704 2012-11-30  Michelangelo De Simone  <michelangelo@webkit.org>
705
706         [CSS Shaders] Clamp input colors before blending
707         https://bugs.webkit.org/show_bug.cgi?id=98962
708
709         Reviewed by Dean Jackson.
710
711         The result of css_ColorMatrix multiplication is now clamped in [0.0, 1.0]
712         before the blending step.
713
714         Relevant spec section is:
715         http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#shader-processing-model
716
717         Tests: css3/filters/custom/custom-filter-color-clamping-negative.html
718                css3/filters/custom/custom-filter-color-clamping.html
719
720         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
721         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader): Added clamping
722         code.
723
724 2012-11-30  Abhishek Arya  <inferno@chromium.org>
725
726         Crash due to intruding float not removed after writing mode changed.
727         https://bugs.webkit.org/show_bug.cgi?id=100149
728
729         Reviewed by Levi Weintraub.
730
731         When RenderView writing mode changes, make sure to mark all descendants
732         with floats for layout.
733
734         Test: fast/block/float/intruding-float-not-removed-writing-mode.xhtml
735
736         * rendering/RenderBox.cpp:
737         (WebCore::RenderBox::styleDidChange):
738
739 2012-11-30  Florin Malita  <fmalita@chromium.org>
740
741         SVG pattern data deleted while in use
742         https://bugs.webkit.org/show_bug.cgi?id=103415
743
744         Reviewed by Dirk Schulze.
745
746         Various calls in RenderSVGResourcePattern::applyResource() can trigger invalidations,
747         which may end up deleting our current pattern data (via removeAllClientsFromCache).
748         To avoid this, we should add the pattern data to the cache only after it is fully built.
749         For clarity, the patch also refactors the pattern setup code into a separate method.
750
751         Test: svg/custom/large-image-pattern-crash.html
752
753         * rendering/svg/RenderSVGResourcePattern.cpp:
754         (WebCore::RenderSVGResourcePattern::buildPattern):
755         (WebCore::RenderSVGResourcePattern::applyResource):
756         * rendering/svg/RenderSVGResourcePattern.h:
757         (RenderSVGResourcePattern):
758
759 2012-11-30  Alexander Pavlov  <apavlov@chromium.org>
760
761         Web Inspector: It's Sass, not SASS
762         https://bugs.webkit.org/show_bug.cgi?id=103626
763
764         Reviewed by Yury Semikhatsky.
765
766         Change "SASS" to "Sass" in UI strings.
767
768         * English.lproj/localizedStrings.js:
769         * inspector/front-end/Settings.js:
770         (WebInspector.ExperimentsSettings):
771         * inspector/front-end/SettingsScreen.js:
772
773 2012-11-29  Tommy Widenflycht  <tommyw@google.com>
774
775         Speech Recognition API: Update SpeechRecognitionEvent/Result to match the specification
776         https://bugs.webkit.org/show_bug.cgi?id=103407
777
778         Reviewed by Adam Barth.
779
780         This patch does the following:
781         o Adds results, and removing result on SpeechRecognitionEvent
782         o Renaming SpeechRecognitionResult::final to isFinal
783         o Moving emma to SpeechRecognitionEvent from SpeechRecognitionResult
784
785         Existing tests updated to test the new API.
786
787         * Modules/speech/SpeechRecognition.cpp:
788         (WebCore::SpeechRecognition::start):
789         (WebCore::SpeechRecognition::didReceiveResults):
790         (WebCore):
791         * Modules/speech/SpeechRecognition.h:
792         (SpeechRecognition):
793         * Modules/speech/SpeechRecognitionEvent.cpp:
794         (WebCore::SpeechRecognitionEvent::createResult):
795         (WebCore):
796         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
797         (WebCore::SpeechRecognitionEvent::~SpeechRecognitionEvent):
798         (WebCore::emmaQualifiedName):
799         (WebCore::SpeechRecognitionEvent::emma):
800         * Modules/speech/SpeechRecognitionEvent.h:
801         (WebCore):
802         (SpeechRecognitionEventInit):
803         (SpeechRecognitionEvent):
804         (WebCore::SpeechRecognitionEvent::resultIndex):
805         (WebCore::SpeechRecognitionEvent::results):
806         * Modules/speech/SpeechRecognitionEvent.idl:
807         * Modules/speech/SpeechRecognitionResult.cpp:
808         * Modules/speech/SpeechRecognitionResult.h:
809         (WebCore::SpeechRecognitionResult::isFinal):
810         (SpeechRecognitionResult):
811         * Modules/speech/SpeechRecognitionResult.idl:
812         * WebCore.gypi:
813         * bindings/v8/custom/V8SpeechRecognitionEventCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8SpeechRecognitionResultCustom.cpp.
814         (WebCore):
815         (WebCore::V8SpeechRecognitionEvent::opaqueRootForGC):
816
817 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi  <pierre.rossi@digia.com>
818
819         [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
820         https://bugs.webkit.org/show_bug.cgi?id=99314
821
822         Reviewed by Tor Arne Vestbø.
823
824         This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
825         shared libraries.
826
827         It's a big refactoring that mostly involves moving WebCore dependent
828         code into QtWebKit and accessing it through exported QWebFrameAdapter
829         and QWebPageAdapter classes.
830
831         * Target.pri:
832         * platform/qt/QStyleFacade.h: Get rid of styleForPage function, not needed
833         anymore.
834         * platform/qt/QWebPageClient.h:
835         (QWebPageClient): Remove a whole lot of cruft in favour of a simple GL enabling
836         callback to select the GL texture mapper.
837         (QWebPageClient::makeOpenGLContextCurrentIfAvailable):
838
839 2012-11-30  Simon Hausmann  <simon.hausmann@digia.com>
840
841         Unreviewed, rolling out r136227.
842         http://trac.webkit.org/changeset/136227
843
844         Broke the Qt bots due to version mismatch
845
846         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
847         (FullScreenVideoWindow::FullScreenVideoWindow):
848         (PlatformVideoWindow::PlatformVideoWindow):
849
850 2012-11-30  Samuel Rødal  <samuel.rodal@digia.com>
851
852         [Qt] Fixed use of to-be-removed compatibility functions in QWindow.
853
854         Reviewed by Simon Hausmann.
855
856         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
857         (FullScreenVideoWindow::FullScreenVideoWindow):
858         (PlatformVideoWindow::PlatformVideoWindow):
859
860 2012-11-30  Arpita Bahuguna  <arpitabahuguna@gmail.com>
861
862         Caret is painted horizontally in vertical writing mode when there are no visible text
863         https://bugs.webkit.org/show_bug.cgi?id=102359
864
865         Reviewed by Ryosuke Niwa.
866
867         In the vertical writing mode the caret rect on an empty editable box or
868         an empty line is rendered as per the horizontal writing mode.
869
870         This changes though when any text is added; the caret is then displayed
871         in accordance with the vertical writing mode.
872
873         Test: editing/selection/caret-alignment-for-vertical-text.html
874
875         * rendering/RenderBox.cpp:
876         (WebCore::RenderBox::localCaretRect):
877         * rendering/RenderBoxModelObject.cpp:
878         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
879         The caret rect should be transposed for the vertical writing mode. Its
880         width and height values need to be interchanged for it to be oriented
881         as per the vertical text.
882
883 2012-11-30  Sankeerth V S  <sankeerth.vs@samsung.com>
884
885         Web Inspector: [Timeline] JS error when clicking in Memory Statistics view
886         https://bugs.webkit.org/show_bug.cgi?id=103486
887
888         Reviewed by Alexander Pavlov.
889
890         The counter value can be null/undefined. Hence a check is needed
891         before we access the "time" property on this counter object.
892
893         No new tests required as UI related change.
894
895         * inspector/front-end/MemoryStatistics.js:
896         (WebInspector.MemoryStatistics.prototype._onClick):
897
898 2012-11-30  Kent Tamura  <tkent@chromium.org>
899
900         Fix typos in DateTimeNumericFieldElement.cpp and DateTimeSymbolicFieldElement.cpp
901         https://bugs.webkit.org/show_bug.cgi?id=103717
902
903         Reviewed by Hajime Morita.
904
905         * html/shadow/DateTimeNumericFieldElement.cpp:
906         (WebCore::DateTimeNumericFieldElement::customStyleForRenderer):
907         maximum, not maxium.
908         * html/shadow/DateTimeSymbolicFieldElement.cpp:
909         (WebCore::DateTimeSymbolicFieldElement::customStyleForRenderer): Ditto.
910
911 2012-11-30  Halton Huo  <halton.huo@intel.com>
912
913         [EFL] libwebcore_efl.a fail to link when enable webgl
914         https://bugs.webkit.org/show_bug.cgi?id=103610
915
916         Reviewed by Gyuyoung Kim.
917
918         libwebcore_efl.a should link to X11, Xcomposite and Xrender libraries when ENABLE_WEBGL is ON
919
920         No new tests, no behavior change for layout tests.
921
922         * PlatformEfl.cmake: Append ${X11_X11_LIB}, ${X11_Xcomposite_LIB} and ${X11_Xrender_LIB} to WebCore_LIBRARIES
923
924 2012-11-30  Tim Horton  <timothy_horton@apple.com>
925
926         Unreviewed, fix the PDFPlugin build after http://trac.webkit.org/changeset/136205.
927
928         * WebCore.xcodeproj/project.pbxproj:
929
930 2012-11-30  Mihai Maerean  <mmaerean@adobe.com>
931
932         [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
933         https://bugs.webkit.org/show_bug.cgi?id=101192
934
935         Reviewed by Hajime Morita.
936
937         Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
938
939         Tests: No new tests because there is no functional change.
940
941         * WebCore.exp.in:
942         * WebCore.vcproj/copyForwardingHeaders.cmd:
943         * WebCore.xcodeproj/project.pbxproj:
944         * bindings/generic/RuntimeEnabledFeatures.cpp:
945         (WebCore):
946         * bindings/generic/RuntimeEnabledFeatures.h:
947         (RuntimeEnabledFeatures):
948         (WebCore::RuntimeEnabledFeatures::setCSSRegionsEnabled):
949         (WebCore::RuntimeEnabledFeatures::cssRegionsEnabled):
950         * dom/Document.cpp:
951         (WebCore::Document::cssRegionsEnabled):
952         * page/Settings.cpp:
953         (WebCore::Settings::Settings):
954         * page/Settings.h:
955         (Settings):
956
957 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
958
959         [GTK] [WebKit2] WebKitWebViewBase creates a GL context for the redirected XComposite window crashing WebKit in Xvfb
960         https://bugs.webkit.org/show_bug.cgi?id=103476
961
962         Reviewed by Alejandro G. Castro.
963
964         Allow creation of RedirectedXCompositeWindow in a mode which does not have a backing
965         GLContext. For WebKit2 the GLContext is always in the WebProcess. Creating the GLContext
966         in both processes can cause crashes when library is run in Xvfb.
967
968         No new tests. This fixes a crash running tests on some systems.
969
970         * platform/gtk/RedirectedXCompositeWindow.cpp:
971         (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
972         (WebCore::RedirectedXCompositeWindow::resize): Do not create the GLContext when
973         in the new no-GLContext mode.
974         (WebCore::RedirectedXCompositeWindow::context): ASSERT that we are not in
975         no-GLContext mode.
976
977 2012-11-29  Keishi Hattori  <keishi@webkit.org>
978
979         Better type ahead for DateTimeSymbolicFieldElement
980         https://bugs.webkit.org/show_bug.cgi?id=103031
981
982         Reviewed by Kent Tamura.
983
984         This cuts out the type ahead code that will be used by HTMLSelectElement
985         and DateTimeSymbolicFieldElement into a TypeAhead class. This will
986         improve DateTimeSymbolicFieldElement type ahead which was first
987         character match only, by adding cycling, prefix match and index number
988         match.
989
990         Added tests to month-multiple-fields-keyboard-events.html.
991
992         * GNUmakefile.list.am: Added TypeAhead.{h,cpp}
993         * Target.pri: Ditto.
994         * WebCore.gypi: Ditto.
995         * WebCore.vcproj/WebCore.vcproj: Ditto.
996         * WebCore.xcodeproj/project.pbxproj: Ditto.
997         * CMakeLists.txt: Ditto.
998         * html/HTMLSelectElement.cpp:
999         (WebCore):
1000         (WebCore::HTMLSelectElement::HTMLSelectElement):
1001         (WebCore::HTMLSelectElement::indexOfSelectedOption): Returns index of current selection.
1002         (WebCore::HTMLSelectElement::optionCount): Returns total number of options.
1003         (WebCore::HTMLSelectElement::optionAtIndex): Returns option at index.
1004         (WebCore::HTMLSelectElement::typeAheadFind): Use TypeAhead.
1005         * html/HTMLSelectElement.h:
1006         (HTMLSelectElement):
1007         * html/TypeAhead.cpp: Added.
1008         (WebCore):
1009         (WebCore::TypeAhead::TypeAhead):
1010         (WebCore::stripLeadingWhiteSpace): Moved from HTMLSelectElement.cpp.
1011         (WebCore::TypeAhead::handleEvent): Returns index for match.
1012         * html/TypeAhead.h: Added.
1013         (WebCore):
1014         (TypeAheadDataSource): Provide the data about the options that TypeAhead should match against.
1015         (TypeAhead):
1016         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1017         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1018         (WebCore::DateTimeSymbolicFieldElement::handleKeyboardEvent):
1019         (WebCore::DateTimeSymbolicFieldElement::indexOfSelectedOption):
1020         (WebCore):
1021         (WebCore::DateTimeSymbolicFieldElement::optionCount):
1022         (WebCore::DateTimeSymbolicFieldElement::optionAtIndex):
1023         * html/shadow/DateTimeSymbolicFieldElement.h:
1024         (DateTimeSymbolicFieldElement):
1025
1026 2012-11-29  Rafael Weinstein  <rafaelw@chromium.org>
1027
1028         [HTMLTemplateElement] Add feature flag
1029         https://bugs.webkit.org/show_bug.cgi?id=103694
1030
1031         Reviewed by Adam Barth.
1032
1033         This flag will guard the implementation of the HTMLTemplateElement.
1034         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
1035
1036         * Configurations/FeatureDefines.xcconfig:
1037         * GNUmakefile.features.am:
1038
1039 2012-11-29  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
1040
1041         Fix typo in commit 136189
1042         https://bugs.webkit.org/show_bug.cgi?id=103706
1043
1044         Reviewed by Kentaro Hara.
1045
1046         Because of typo in commit 136189 blue color value was set twice for every pixel.
1047
1048         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1049         (WebCore::setPixel):
1050
1051 2012-11-29  Elliott Sprehn  <esprehn@chromium.org>
1052
1053         Node::isDescendantOf contains logic that duplicates isDocumentNode
1054         https://bugs.webkit.org/show_bug.cgi?id=103698
1055
1056         Reviewed by Hajime Morita.
1057
1058         Instead of checking for documents with node->document() == node just
1059         use node->isDocumentNode().
1060
1061         * dom/Node.cpp:
1062         (WebCore::Node::isDescendantOf):
1063
1064 2012-11-29  Alexey Proskuryakov  <ap@apple.com>
1065
1066         [WK2] Forward cookie jar calls to NetworkProcess
1067         https://bugs.webkit.org/show_bug.cgi?id=103457
1068
1069         Reviewed by Darin Adler.
1070
1071         * WebCore.exp.in:
1072         * WebCore.xcodeproj/project.pbxproj:
1073         PlatformCookieJar.h functions are now used in WebKit2.
1074
1075         * loader/CookieJar.cpp:
1076         (WebCore::cookies):
1077         (WebCore::setCookies):
1078         (WebCore::cookiesEnabled):
1079         (WebCore::cookieRequestHeaderFieldValue):
1080         (WebCore::getRawCookies):
1081         (WebCore::deleteCookie):
1082         (WebCore::getHostnamesWithCookies):
1083         (WebCore::deleteCookiesForHostname):
1084         (WebCore::deleteAllCookies):
1085         Use a strategy instead of going to PlatformCookieJar directly.
1086
1087         * platform/Cookie.h: (Cookie): Added a default constructor, so that Cookie could be
1088         sent over IPC.
1089
1090         * platform/CookiesStrategy.h: Added functions for cookie jar.
1091
1092 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1093
1094         Unreviewed, rolling out r136167.
1095         http://trac.webkit.org/changeset/136167
1096         https://bugs.webkit.org/show_bug.cgi?id=103701
1097
1098         Win debug build failure (Requested by zhenyao on #webkit).
1099
1100         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1101         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1102         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1103         (LazyDecodingPixelRef):
1104
1105 2012-11-29  David Grogan  <dgrogan@chromium.org>
1106
1107         IndexedDB: Propagate more leveldb errors to script
1108         https://bugs.webkit.org/show_bug.cgi?id=103580
1109
1110         Reviewed by Tony Chang.
1111
1112         LevelDBDatabase used a single return value to indicate both I/O problems
1113         and a missing key. Now an out variable is used to indicate if the
1114         requested key was found. The return value is used to report corruption
1115         or disk error.
1116
1117         This is a small step toward propagating low level errors everywhere
1118         possible. So far only one scenario will newly cause script to receive
1119         an error: when leveldb has trouble looking for existing keys during an
1120         objectstore->add.
1121
1122         * Modules/indexeddb/IDBBackingStore.cpp:
1123         (WebCore::getInt):
1124         (WebCore::getVarInt):
1125         (WebCore::getString):
1126         (WebCore::IDBBackingStore::getKeyGeneratorCurrentNumber):
1127         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1128         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1129         * Modules/indexeddb/IDBBackingStore.h:
1130         (IDBBackingStore):
1131         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1132         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
1133         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1134         (WebCore::IDBObjectStoreBackendImpl::generateKey):
1135         (WebCore::IDBObjectStoreBackendImpl::updateKeyGenerator):
1136         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
1137         (IDBObjectStoreBackendImpl):
1138         * platform/leveldb/LevelDBDatabase.cpp:
1139         (WebCore::LevelDBDatabase::safeGet):
1140         * platform/leveldb/LevelDBDatabase.h:
1141         (LevelDBDatabase):
1142         * platform/leveldb/LevelDBTransaction.cpp:
1143         (WebCore::LevelDBTransaction::safeGet):
1144         (WebCore):
1145         (WebCore::LevelDBTransaction::get):
1146         * platform/leveldb/LevelDBTransaction.h:
1147         (LevelDBTransaction):
1148
1149 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1150
1151         Unreviewed, rolling out r136171.
1152         http://trac.webkit.org/changeset/136171
1153         https://bugs.webkit.org/show_bug.cgi?id=103695
1154
1155         Likely caused ReOpenedWithID and ReOpenedWithURL to fail in
1156         linux/chromeos (Requested by zhenyao on #webkit).
1157
1158         * inspector/InspectorClient.h:
1159         (WebCore::InspectorClient::startMainThreadMonitoring):
1160         (WebCore::InspectorClient::stopMainThreadMonitoring):
1161         * inspector/InspectorController.cpp:
1162         * inspector/InspectorController.h:
1163         (InspectorController):
1164         * inspector/InspectorInstrumentation.cpp:
1165         (WebCore):
1166         (WebCore::InspectorInstrumentation::willProcessTaskImpl):
1167         (WebCore::InspectorInstrumentation::didProcessTaskImpl):
1168         * inspector/InspectorInstrumentation.h:
1169         (InspectorInstrumentation):
1170         (WebCore::InspectorInstrumentation::willProcessTask):
1171         (WebCore):
1172         (WebCore::InspectorInstrumentation::didProcessTask):
1173         * inspector/InspectorTimelineAgent.cpp:
1174         (WebCore::InspectorTimelineAgent::start):
1175         (WebCore::InspectorTimelineAgent::stop):
1176
1177 2012-11-29  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
1178
1179         Optimization in image decoding.
1180         https://bugs.webkit.org/show_bug.cgi?id=88424
1181
1182         Reviewed by Brent Fulgham.
1183
1184         Reduce branching and multiplications in JPEG image decoding loops and functions.
1185         Code is moved to the template functions with scale and color space template parameters
1186         because they were reason of branches inside loops. With templated funtions compiler
1187         will generate separate instance of function for every set of parameters removing
1188         unreachable code in every condition where constant value is used.
1189
1190         Rebase and update of original patch by Misha Tyutyunik <michael.tyuytunik@nokia.com> .
1191
1192         Thanks to Noel Gordon for his help in cleaning up remaining issues.
1193
1194         Covered by existing tests.
1195
1196         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1197         (WebCore):
1198         (WebCore::setPixel):
1199         (WebCore::JPEGImageDecoder::outputScanlines):
1200         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
1201         (JPEGImageDecoder):
1202
1203 2012-11-29  Kentaro Hara  <haraken@chromium.org>
1204
1205         Unreviewed, rolling out r135862.
1206         http://trac.webkit.org/changeset/135862
1207         https://bugs.webkit.org/show_bug.cgi?id=103367
1208
1209         We've been observing 'Fatal error in
1210         v8::V8::AddMessageListener()' in bots
1211
1212         * bindings/v8/V8Binding.cpp:
1213         (WebCore::v8NonStringValueToWebCoreString):
1214         * bindings/v8/V8StringResource.cpp:
1215         (WebCore::int32ToWebCoreStringFast):
1216         (WebCore::int32ToWebCoreString):
1217         * bindings/v8/V8StringResource.h:
1218         (WebCore::V8StringResource::V8StringResource):
1219         (WebCore::V8StringResource::prepareBase):
1220         (WebCore::V8StringResource::setString):
1221         (V8StringResource):
1222         (WebCore::V8StringResource::toString):
1223         (WebCore::::prepare):
1224
1225 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
1226
1227         Web Inspector: optimize repaint regions upon text editing
1228         https://bugs.webkit.org/show_bug.cgi?id=103674
1229
1230         Reviewed by Vsevolod Vlasov.
1231
1232         There is a lot happening that makes repaint area larger than it should be,
1233         namely unnecessary tabbed pane and navigator updates.
1234
1235         * inspector/front-end/NavigatorView.js:
1236         (WebInspector.NavigatorView.prototype._updateScriptTitle):
1237         * inspector/front-end/TabbedPane.js:
1238         (WebInspector.TabbedPaneTab.prototype.set title):
1239
1240 2012-11-29  KyungTae Kim  <ktf.kim@samsung.com>
1241
1242         Unused parameters on plugins/npapi.cpp
1243         https://bugs.webkit.org/show_bug.cgi?id=103676
1244
1245         Reviewed by Kentaro Hara.
1246
1247         Because 'instance' and 'menu' are not used when !PLATFORM(QT) || !defined(XP_MACOSX),
1248         use UNUSED_PARAM macro to fix build warning -Wunused-parameter
1249
1250         * plugins/npapi.cpp:
1251         (NPN_PopUpContextMenu):
1252
1253 2012-11-29  Pablo Flouret  <pablof@motorola.com>
1254
1255         REGRESSION(r134693): Compilation error on @supports grammar code
1256         https://bugs.webkit.org/show_bug.cgi?id=103678
1257
1258         Reviewed by Tony Chang.
1259
1260         Coming from https://bugs.webkit.org/show_bug.cgi?id=102295
1261
1262         No new tests, compile fix.
1263
1264         * css/CSSGrammar.y.in:
1265
1266 2012-11-29  Simon Fraser  <simon.fraser@apple.com>
1267
1268         Avoid painting lots of small rects in WebLayer painting
1269         https://bugs.webkit.org/show_bug.cgi?id=103673
1270
1271         Reviewed by Tim Horton.
1272
1273         r109186 added code in drawLayerContents() to enumerate over the rects in
1274         the CALayer's dirty region, and paint them individually. This was done
1275         to help performance on the IE Maze Solver test.
1276         
1277         On large, complex pages like Facebook, the overhead of traversing the
1278         RenderLayer tree for painting is such that it's better to paint a single,
1279         or fewer rects rather than lots of little ones.
1280         
1281         So adopt a heuristic similar to that in DrawingArea, where if the
1282         combined area of the small rects is 75% or more of the combined rect,
1283         just paint the combined rect. Also paint the combined rect if there
1284         are more than 5 individual rects.
1285         
1286         I verified that this preserves the optimization for IE Maze Solver.
1287
1288         * platform/graphics/mac/WebLayer.mm:
1289         (drawLayerContents):
1290
1291 2012-11-29  Eugene Klyuchnikov  <eustas@chromium.org>
1292
1293         Web Inspector: Web Inspector: Make main-thread monitoring go through InspectorController.
1294         https://bugs.webkit.org/show_bug.cgi?id=103550
1295
1296         Reviewed by Pavel Feldman.
1297
1298         InspectorInstrumentation was a wrong path.
1299
1300         * inspector/InspectorClient.h: Remove start/stop methods.
1301         * inspector/InspectorController.cpp:
1302         Dispatch main thread activity notifications. 
1303         * inspector/InspectorController.h: Ditto.
1304         * inspector/InspectorInstrumentation.cpp: Remove dispatching.
1305         * inspector/InspectorInstrumentation.h: Ditto.
1306         * inspector/InspectorTimelineAgent.cpp:
1307         Do not subscribe for notifications explicitly.
1308
1309 2012-11-29  Adam Barth  <abarth@webkit.org>
1310
1311         [V8] DOM callbacks shouldn't reimplement ScopedPersistent they should use it
1312         https://bugs.webkit.org/show_bug.cgi?id=103662
1313
1314         Reviewed by Eric Seidel.
1315
1316         This patch replaces yet another instance of the ScopedPersistent
1317         pattern with ScopedPersistent.
1318
1319         * bindings/scripts/CodeGeneratorV8.pm:
1320         (GenerateCallbackHeader):
1321         (GenerateCallbackImplementation):
1322         * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp:
1323         (WebCore::V8SQLStatementErrorCallback::handleEvent):
1324         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1325         (WebCore::V8MutationCallback::handleEvent):
1326
1327 2012-11-29  Min Qin  <qinmin@chromium.org>
1328
1329         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
1330         https://bugs.webkit.org/show_bug.cgi?id=103555
1331
1332         Reviewed by Stephen White.
1333
1334         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
1335         No test added for now as impl side paiting is still WIP.
1336
1337         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1338         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1339         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
1340         (WebCore):
1341         (WebCore::LazyDecodingPixelRef::Decode):
1342         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1343         (LazyDecodingPixelRef):
1344
1345 2012-11-29  Julien Chaffraix  <jchaffraix@webkit.org>
1346
1347         Unreviewed build fix.
1348
1349         * WebCore.gypi:
1350         The new file is GridTrackSize.h not GridTrackSizes.h. For some reason, the
1351         EWS didn't complain.
1352
1353 2012-11-29  John Knottenbelt  <jknotten@chromium.org>
1354
1355         Use GeolocationController's last geoposition as cached position.
1356         https://bugs.webkit.org/show_bug.cgi?id=103540
1357
1358         Reviewed by Benjamin Poulain.
1359
1360         The page's GeolocationController mediates access to the
1361         GeolocationClient for multiple frames' Geolocation instances. This
1362         patch changes the position cache to be on the GeolocationController
1363         rather than on the Geolocation instance.
1364
1365         This fixes a bug where if one frame has has received a fresh
1366         position, then a request for a cached position from a second frame
1367         does not succeed because the Geolocation instance in the second
1368         frame's position cache hasn't received the position update that
1369         went to the first frame.
1370
1371         Test: fast/dom/Geolocation/cached-position-iframe.html
1372
1373         * Modules/geolocation/Geolocation.cpp:
1374         (WebCore::Geolocation::makeCachedPositionCallbacks):
1375         (WebCore::Geolocation::haveSuitableCachedPosition):
1376         (WebCore::Geolocation::positionChanged):
1377         * Modules/geolocation/Geolocation.h:
1378         * Modules/geolocation/GeolocationController.h:
1379         (GeolocationController):
1380
1381 2012-11-29  Alexei Filippov  <alph@chromium.org>
1382
1383         Web Inspector: Allow sorting in NMI snapshot grid view
1384         https://bugs.webkit.org/show_bug.cgi?id=102955
1385
1386         Reviewed by Yury Semikhatsky.
1387
1388         * English.lproj/localizedStrings.js:
1389         * inspector/front-end/NativeMemorySnapshotView.js:
1390         (WebInspector.NativeSnapshotDataGrid.prototype.sortingChanged):
1391         (WebInspector.NativeSnapshotDataGrid.prototype._sortingFunction):
1392         (WebInspector.NativeSnapshotNode):
1393         (WebInspector.NativeSnapshotNode.prototype._storeState):
1394         (WebInspector.NativeSnapshotNode.prototype._restoreState):
1395         (WebInspector.NativeSnapshotNode.prototype.uid):
1396         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
1397
1398 2012-11-29  Martin Robinson  <mrobinson@igalia.com>
1399
1400         [GTK] [WebKit2] Embed the HTTP authentication dialog into the WebView
1401         https://bugs.webkit.org/show_bug.cgi?id=103277
1402
1403         Reviewed by Carlos Garcia Campos.
1404
1405         Refactor the WebCore authentication dialog so that it can be reused for the WebKit2
1406         embedded authentication dialog. The main purpose of this refactor is so that the
1407         dialog does not rely on GtkDialog to add the action buttons to the dialog itself.
1408         This also simplifies the structure of the dialog, using the GtkTable or GtkGrid to
1409         contain more of the widget elements, greatly simplifying this code. We also expose
1410         a new constructor that does not create the parent GtkDialog -- so that WebKit2
1411         can embed the dialog directly into the WebView.
1412
1413         No new tests. This shouldn't change behavior, only slightly the look of the authentication
1414         dialog.
1415
1416         * platform/gtk/GtkAuthenticationDialog.cpp:
1417         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added this new constructor
1418         which does not add the dialog contents to a GtkDialog.
1419         (WebCore::packTwoColumnLayoutInBox): Added this generic method for creating a two column
1420         layout in the style the dialog box needs (for both GTK+ 2.x and GTK+ 3.x).
1421         (WebCore::createDialogLabel): Added this helper.
1422         (WebCore::createDialogEntry): ditto.
1423         (WebCore::GtkAuthenticationDialog::createContentsInContainer): Added this method which
1424         can be used by subclasses to add the guts of the dialog to the parent container.
1425         (WebCore::GtkAuthenticationDialog::show): Added some focus/default handling code that
1426         GtkDialog was calling before.
1427         (WebCore::GtkAuthenticationDialog::buttonClickedCallback): Added a button clicked handler.
1428         Before GtkDialog handled this.
1429         * platform/gtk/GtkAuthenticationDialog.h: Updated methods to reflect new functionality.
1430         (WebCore::GtkAuthenticationDialog::~GtkAuthenticationDialog): Inline the default constructor.
1431
1432 2012-11-29  Beth Dakin  <bdakin@apple.com>
1433
1434         https://bugs.webkit.org/show_bug.cgi?id=103577
1435         TiledDrawingArea should recycle tiles
1436         -and corresponding-
1437         <rdar://problem/12714586>
1438
1439         Reviewed by Simon Fraser.
1440
1441         New class LayerPool will keep a list of layers to reuse so that 
1442         we can avoid creating and destroying so many layer.
1443
1444         When removing layers, add them to the LayerPool
1445         * platform/graphics/ca/mac/TileCache.mm:
1446         (WebCore::TileCache::revalidateTiles):
1447
1448         Before creating a new layer, try to get one of the appropriate size 
1449         from the LayerPool.
1450         (WebCore::TileCache::createTileLayer):
1451
1452         New class.
1453         * WebCore.xcodeproj/project.pbxproj:
1454         * platform/graphics/ca/mac/LayerPool.h: Added.
1455         (WebCore):
1456         (LayerPool):
1457         (WebCore::LayerPool::capacity):
1458         (WebCore::LayerPool::canReuseLayerWithSize):
1459         * platform/graphics/ca/mac/LayerPool.mm: Added.
1460         (WebCore):
1461         (WebCore::LayerPool:: LayerPool):
1462         (WebCore::LayerPool::sharedPool):
1463         (WebCore::LayerPool::bytesBackingLayerWithPixelSize):
1464         (WebCore::LayerPool::listOfLayersWithSize):
1465         (WebCore::LayerPool::addLayer):
1466         (WebCore::LayerPool::takeLayerWithSize):
1467         (WebCore::LayerPool::decayedCapacity):
1468         (WebCore::LayerPool::schedulePrune):
1469         (WebCore::LayerPool::prune):
1470         (WebCore::LayerPool::drain):
1471
1472         If we're under memory pressure, drain the LayerPool
1473         * platform/mac/MemoryPressureHandlerMac.mm:
1474         (WebCore::MemoryPressureHandler::releaseMemory):
1475
1476 2012-11-29  Julien Chaffraix  <jchaffraix@webkit.org>
1477
1478         [CSS Grid Layout] track sizing functions should have their own type
1479         https://bugs.webkit.org/show_bug.cgi?id=103343
1480
1481         Reviewed by Tony Chang.
1482
1483         The current code uses a Length to represent the track sizing function. This is
1484         fine as we only parse <length> | <percentage> but in order to support minmax
1485         sizing, we have to store 2 Lengths. We could go with a pair but that would make
1486         the code not very readable so this change introduces GridTrackSize.
1487
1488         Refactoring, covered by existing tests.
1489
1490         * GNUmakefile.list.am:
1491         * Target.pri:
1492         * WebCore.gypi:
1493         * WebCore.vcproj/WebCore.vcproj:
1494         * WebCore.xcodeproj/project.pbxproj:
1495         Added GridTrackSize.h to all our build systems.
1496
1497         * css/CSSComputedStyleDeclaration.cpp:
1498         (WebCore::valueForGridTrackBreadth):
1499         (WebCore::valueForGridTrackList):
1500         * css/StyleResolver.cpp:
1501         (WebCore::createGridTrackBreadth):
1502         (WebCore::createGridTrackList):
1503         (WebCore::StyleResolver::applyProperty):
1504         * rendering/RenderGrid.cpp:
1505         (WebCore::RenderGrid::computePreferredLogicalWidths):
1506         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
1507         * rendering/style/RenderStyle.h:
1508         Updated the above call sites to use GridTrackSize. While
1509         touching them, changed the code to use an empty Vector to represent
1510         'none' instead of Length(Undefined).
1511
1512         * rendering/style/StyleGridData.h:
1513         Updated #include, removed a comment as it would have gone stale after
1514         adding more grammar support and added a FIXME to rename some variables.
1515
1516         * rendering/RenderGrid.cpp:
1517         (WebCore::RenderGrid::layoutGridItems):
1518         Implemented a work-around to avoid crashing due to implicit columns / rows.
1519
1520         * rendering/style/GridTrackSize.h: Added.
1521         (WebCore::GridTrackSize::GridTrackSize):
1522         (WebCore::GridTrackSize::length):
1523         (WebCore::GridTrackSize::setLength):
1524         (WebCore::GridTrackSize::type):
1525         (WebCore::GridTrackSize::operator==):
1526         New class, it now only wraps a single Length.
1527
1528 2012-11-29  Helder Correia  <helder.correia@nokia.com>
1529
1530         Typo in Color creation function name
1531         https://bugs.webkit.org/show_bug.cgi?id=103464
1532
1533         Reviewed by Alexey Proskuryakov.
1534
1535         Renaming createUnCheked() as createUnchecked().
1536
1537         No new tests.
1538
1539         * platform/graphics/Color.cpp:
1540         (WebCore::colorFromPremultipliedARGB):
1541         * platform/graphics/Color.h:
1542         (WebCore::Color::createUnchecked):
1543
1544 2012-11-29  Otto Derek Cheung  <otcheung@rim.com>
1545
1546         [BlackBerry] Cookies in private mode should not have access to public cookies
1547         https://bugs.webkit.org/show_bug.cgi?id=103649
1548
1549         Reviewed by Rob Buis.
1550
1551         PR 253983
1552
1553         When CookieManager switches back from public to private mode,
1554         we will clear the cookie tree so the browser won't have access
1555         to the public cookies.
1556
1557         Tested using browser.swlab.rim.net cookie tests and the steps in
1558         the PR.
1559
1560         * platform/blackberry/CookieManager.cpp:
1561         (WebCore::CookieManager::setPrivateMode):
1562
1563 2012-11-29  Brent Fulgham  <bfulgham@gmail.com>
1564
1565         Be consistent in handling of frameAtIndex (and related) returns.
1566         https://bugs.webkit.org/show_bug.cgi?id=103207
1567
1568         Reviewed by David Hyatt.
1569
1570         Under various conditions, frameAtIndex (and therefore,
1571         nativeImageForCurrentFrame) returns null. A series of bugs over
1572         the years has ensured null returns are handled in some cases,
1573         but there are a handful of remaining cases where this is still a
1574         problem. 
1575
1576         No new tests, as these low-level functions are covered by
1577         numerous existing test cases.
1578
1579 2012-11-29  David Hyatt  <hyatt@apple.com>
1580
1581         [New Multicolumn] Add minimum column height tracking and forced break tracking to column sets.
1582         https://bugs.webkit.org/show_bug.cgi?id=103657
1583
1584         Reviewed by Simon Fraser.
1585
1586         * rendering/RenderMultiColumnSet.cpp:
1587         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1588         * rendering/RenderMultiColumnSet.h:
1589         (WebCore::RenderMultiColumnSet::updateMinimumColumnHeight):
1590         (WebCore::RenderMultiColumnSet::minimumColumnHeight):
1591         (RenderMultiColumnSet):
1592         (WebCore::RenderMultiColumnSet::forcedBreaksCount):
1593         (WebCore::RenderMultiColumnSet::forcedBreakOffset):
1594         (WebCore::RenderMultiColumnSet::maximumDistanceBetweenForcedBreaks):
1595         (WebCore::RenderMultiColumnSet::clearForcedBreaks):
1596         (WebCore::RenderMultiColumnSet::addForcedBreak):
1597
1598 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
1599
1600         Web Inspector: introduce fast case for within-chunk edit
1601         https://bugs.webkit.org/show_bug.cgi?id=103545
1602
1603         Reviewed by Vsevolod Vlasov.
1604
1605         Special-casing edits within the chunk for faster operation.
1606
1607         * inspector/front-end/DOMExtension.js:
1608         (removeSubsequentNodes):
1609         * inspector/front-end/DefaultTextEditor.js:
1610         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
1611
1612 2012-11-29  Pavel Feldman  <pfeldman@chromium.org>
1613
1614         Web Inspector: Console: hovering node wrappers in object tree should highlight them on the page
1615         https://bugs.webkit.org/show_bug.cgi?id=101150
1616
1617         Reviewed by Vsevolod Vlasov.
1618
1619         - Introduced a way to highlight nodes by object id in addition to node id.
1620         - Decorated nodes in the object tree outline and added on-hover highlighting.
1621
1622         * inspector/Inspector.json:
1623         * inspector/InspectorDOMAgent.cpp:
1624         (WebCore::InspectorDOMAgent::highlightNode):
1625         * inspector/InspectorDOMAgent.h:
1626         (InspectorDOMAgent):
1627         * inspector/front-end/ConsoleMessage.js:
1628         (WebInspector.ConsoleMessageImpl.prototype._appendPropertyPreview):
1629         * inspector/front-end/DOMAgent.js:
1630         (WebInspector.DOMAgent.prototype.highlightDOMNode):
1631         * inspector/front-end/DOMPresentationUtils.js:
1632         (WebInspector.DOMPresentationUtils.createSpansForNodeTitle):
1633         * inspector/front-end/ObjectPropertiesSection.js:
1634         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1635         (WebInspector.ObjectPropertyTreeElement.prototype._mouseMove):
1636         (WebInspector.ObjectPropertyTreeElement.prototype._mouseOut):
1637         * inspector/front-end/RemoteObject.js:
1638         (WebInspector.RemoteObject.prototype.highlightAsDOMNode):
1639         (WebInspector.RemoteObject.prototype.hideDOMNodeHighlight):
1640         * inspector/front-end/TestController.js:
1641         * inspector/front-end/externs.js:
1642         * inspector/front-end/inspector.css:
1643         (.console-formatted-node:hover):
1644         * inspector/front-end/utilities.js:
1645
1646 2012-11-29  Dan Bernstein  <mitz@apple.com>
1647
1648         <rdar://problem/12771885> Support ruby-position: {before, after}
1649         https://bugs.webkit.org/show_bug.cgi?id=103569
1650
1651         Reviewed by Anders Carlsson.
1652
1653         Specified in <http://www.w3.org/TR/2011/WD-css3-ruby-20110630/#rubypos>, the ruby-position
1654         property takes four values: before, after, inter-character, and inline. This change adds
1655         support for the values before and after.
1656
1657         Test: fast/ruby/position-after.html
1658
1659         * css/CSSComputedStyleDeclaration.cpp:
1660         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle ruby-position.
1661         * css/CSSParser.cpp:
1662         (WebCore::isValidKeywordPropertyAndValue): Accept before and after as valid values for
1663         ruby-position.
1664         (WebCore::isKeywordPropertyID): Added ruby-position to the list of properties with keyword
1665         values.
1666         (WebCore::CSSParser::parseValue): Added ruby-position to the switch statement.
1667         * css/CSSPrimitiveValueMappings.h:
1668         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mapping from RubyPosition.
1669         (WebCore::CSSPrimitiveValue::operator RubyPosition): Added mapping from CSSPrimitiveValue.
1670         * css/CSSProperty.cpp:
1671         (WebCore::CSSProperty::isInheritedProperty): Added ruby-position as an inherited property.
1672         * css/CSSPropertyNames.in: Added -webkit-ruby-position.
1673         * css/CSSValueKeywords.in: Added after and before.
1674         * css/StyleBuilder.cpp:
1675         (WebCore::StyleBuilder::StyleBuilder): Added a handler for ruby-position.
1676         * css/StyleResolver.cpp:
1677         (WebCore::StyleResolver::applyProperty): Added ruby-position.
1678         * rendering/InlineFlowBox.cpp:
1679         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Changed to choose which of
1680         hasAnnotationsBefore and hasAnnotationsAfter to set based on ruby position.
1681         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Changed to adjust only for
1682         ruby positioned before the base.
1683         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): Added adjustment for ruby
1684         positioned after the base.
1685         * rendering/RenderRubyRun.cpp:
1686         (WebCore::RenderRubyRun::layout): Account for ruby-position when positioning the ruby text
1687         relative to the base.
1688         * rendering/style/RenderStyle.cpp:
1689         (WebCore::RenderStyle::diff): Made a ruby-position difference a layout difference.
1690         * rendering/style/RenderStyle.h: Added rubyPosition(), setRubyPosition(), and 
1691         initialRubyPosition().
1692         * rendering/style/RenderStyleConstants.h: Added the RubyPosition enum.
1693         * rendering/style/StyleRareInheritedData.cpp:
1694         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialized for
1695         m_rubyPosition. Added copying the value of this member to the copy constructor.
1696         (WebCore::StyleRareInheritedData::operator==): Added comparison of m_rubyPosition.
1697         * rendering/style/StyleRareInheritedData.h:
1698         (StyleRareInheritedData): Added m_rubyPosition member variable.
1699
1700 2012-11-29  Tiancheng Jiang  <tijiang@rim.com>
1701
1702         [BlackBerry] Update BB10 form theme.
1703         https://bugs.webkit.org/show_bug.cgi?id=100760
1704
1705         Reviewed by Rob Buis.
1706
1707         Internally Reviewed by Eli Fidler.
1708         Set text color after buttons are pressed.
1709
1710         * css/themeBlackBerry.css:
1711         (input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active):
1712         (select:active):
1713         * platform/blackberry/RenderThemeBlackBerry.cpp:
1714         (WebCore):
1715         (WebCore::RenderThemeBlackBerry::paintButton):
1716         (WebCore::RenderThemeBlackBerry::paintMenuList):
1717
1718 2012-11-29  Zeno Albisser  <zeno@webkit.org>
1719
1720         GraphicsSurfaceGLX: remove redundant parameter from resolveGLMethods.
1721         https://bugs.webkit.org/show_bug.cgi?id=103636
1722
1723         Reviewed by Kenneth Rohde Christiansen.
1724
1725         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1726         (WebCore::resolveGLMethods):
1727         (WebCore::GraphicsSurface::platformCreate):
1728         (WebCore::GraphicsSurface::platformImport):
1729
1730 2012-11-29  Mike West  <mkwst@chromium.org>
1731
1732         Typo in 'autofocus' sandboxing error message.
1733         https://bugs.webkit.org/show_bug.cgi?id=103616
1734
1735         Reviewed by Jochen Eisinger.
1736
1737         The sandbox attribute name is 'allow-scripts', not 'allow-script'. :(
1738
1739         * html/HTMLFormControlElement.cpp:
1740         (WebCore::shouldAutofocus):
1741
1742 2012-11-29  Hajime Morrita  <morrita@google.com>
1743
1744         HTMLMediaElement's .textTracks property does not reflect <track> element
1745         https://bugs.webkit.org/show_bug.cgi?id=103420
1746
1747         Reviewed by Eric Carlson.
1748
1749         There were some assumptions that <track> elements are valid only
1750         if the parent <media> is in document. This change relaxes this
1751         assumption so that <track> is valid when it has <media> as a
1752         parent regardless whether the <media> is in the document or not.
1753
1754         HTMLMediaElement::didAddTrack and didRemoveTrack are now called
1755         when the <track> is inserted to or removed from the parent <media>
1756         element.
1757
1758         Test: media/track/track-node-add-remove.html
1759
1760         * html/HTMLMediaElement.cpp:
1761         (WebCore::HTMLMediaElement::didRemoveTrack):
1762         Renamed from willRemoveTrack() to reflect the timing. This was once called from
1763         Node::willRemove(), which was removed a while ago.
1764         * html/HTMLMediaElement.h:
1765         (HTMLMediaElement):
1766         * html/HTMLTrackElement.cpp:
1767         (WebCore::HTMLTrackElement::insertedInto):
1768         The old code notified parent <media> only if the subtree became a part of the document.
1769         Now it notifies the <media> when this <track> becomes a child of that <media>.
1770
1771         (WebCore::HTMLTrackElement::removedFrom):
1772         The old code notifies the parent <media> every time as long as the parent is available.
1773         Now it notifies the <media> only if this <track> is removed from the parent <media>.
1774         This matches how corresponding notification is done in insertedInto().
1775
1776         * html/track/LoadableTextTrack.cpp:
1777         (WebCore::LoadableTextTrack::trackElementIndex):
1778
1779 2012-11-29  Florin Malita  <fmalita@chromium.org>
1780
1781         [Skia] Add missing OpaqueRegionSkia notifier calls
1782         https://bugs.webkit.org/show_bug.cgi?id=102824
1783
1784         Reviewed by Stephen White.
1785
1786         http://trac.webkit.org/changeset/135390 exposed some canvas draw clients which are not
1787         updating the opaque region tracker. This patch adds the required notifier calls.
1788
1789         No new tests: platform unit tests added.
1790
1791         * platform/graphics/skia/OpaqueRegionSkia.h:
1792         (OpaqueRegionSkia):
1793         * platform/graphics/skia/PlatformContextSkia.h:
1794         (WebCore::PlatformContextSkia::writePixels):
1795         (WebCore::PlatformContextSkia::drawBitmap):
1796         (WebCore::PlatformContextSkia::drawBitmapRect):
1797         (WebCore::PlatformContextSkia::drawIRect):
1798         (WebCore::PlatformContextSkia::drawPosText):
1799         (WebCore::PlatformContextSkia::drawPosTextH):
1800         (WebCore::PlatformContextSkia::drawTextOnPath):
1801
1802 2012-11-29  Andy Shaw  <andy.shaw@digia.com>
1803
1804         [Qt] Implement support for Cocoa based NPAPI plugins on Mac
1805         https://bugs.webkit.org/show_bug.cgi?id=72358
1806
1807         Reviewed by Simon Hausmann.
1808
1809         With later versions of Flash they are only Cocoa based which meant that it was not possible to use Flash in a QtWebKit browser.
1810         This makes it possible to also use 64bit based plugins too.  
1811
1812         * plugins/PluginPackage.cpp:
1813         (WebCore::PluginPackage::initializeBrowserFuncs):
1814         (WebCore):
1815         * plugins/PluginQuirkSet.h:
1816         * plugins/PluginView.cpp:
1817         (WebCore::PluginView::handleEvent):
1818         (WebCore::PluginView::PluginView):
1819         (WebCore):
1820         (WebCore::PluginView::userAgent):
1821         * plugins/PluginView.h:
1822         (WebCore):
1823         (PluginView):
1824         * plugins/mac/PluginPackageMac.cpp:
1825         (WebCore::PluginPackage::determineQuirks):
1826         (WebCore::PluginPackage::fetchInfo):
1827         * plugins/mac/PluginViewMac.mm:
1828         (WebCore):
1829         (WebCore::initializeNPCocoaEvent):
1830         (WebCore::getModifiers):
1831         (WebCore::PluginView::platformStart):
1832         * plugins/npapi.cpp:
1833         (NPN_PopUpContextMenu):
1834         * plugins/npapi.h:
1835
1836 2012-11-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1837
1838         Unreviewed, rolling out r136111.
1839         http://trac.webkit.org/changeset/136111
1840         https://bugs.webkit.org/show_bug.cgi?id=103620
1841
1842         Broke compilation on Mac (unused private field m_matchMode)
1843         (Requested by apavlov on #webkit).
1844
1845         * CMakeLists.txt:
1846         * GNUmakefile.list.am:
1847         * Target.pri:
1848         * WebCore.gypi:
1849         * WebCore.vcproj/WebCore.vcproj:
1850         * WebCore.xcodeproj/project.pbxproj:
1851         * html/HTMLSelectElement.cpp:
1852         (WebCore):
1853         (WebCore::HTMLSelectElement::HTMLSelectElement):
1854         (WebCore::stripLeadingWhiteSpace):
1855         (WebCore::HTMLSelectElement::typeAheadFind):
1856         * html/HTMLSelectElement.h:
1857         (HTMLSelectElement):
1858         * html/TypeAhead.cpp: Removed.
1859         * html/TypeAhead.h: Removed.
1860         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1861         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1862         (WebCore::DateTimeSymbolicFieldElement::handleKeyboardEvent):
1863         * html/shadow/DateTimeSymbolicFieldElement.h:
1864         (DateTimeSymbolicFieldElement):
1865
1866 2012-11-29  Keishi Hattori  <keishi@webkit.org>
1867
1868         Better type ahead for DateTimeSymbolicFieldElement
1869         https://bugs.webkit.org/show_bug.cgi?id=103031
1870
1871         Reviewed by Kent Tamura.
1872
1873         This cuts out the type ahead code that will be used by HTMLSelectElement
1874         and DateTimeSymbolicFieldElement into a TypeAhead class. This will
1875         improve DateTimeSymbolicFieldElement type ahead which was first
1876         character match only, by adding cycling, prefix match and index number
1877         match.
1878
1879         Added tests to month-multiple-fields-keyboard-events.html.
1880
1881         * GNUmakefile.list.am: Added TypeAhead.{h,cpp}
1882         * Target.pri: Ditto.
1883         * WebCore.gypi: Ditto.
1884         * WebCore.vcproj/WebCore.vcproj: Ditto.
1885         * WebCore.xcodeproj/project.pbxproj: Ditto.
1886         * CMakeLists.txt: Ditto.
1887         * html/HTMLSelectElement.cpp:
1888         (WebCore):
1889         (WebCore::HTMLSelectElement::HTMLSelectElement):
1890         (WebCore::HTMLSelectElement::indexOfSelectedOption): Returns index of current selection.
1891         (WebCore::HTMLSelectElement::optionCount): Returns total number of options.
1892         (WebCore::HTMLSelectElement::optionAtIndex): Returns option at index.
1893         (WebCore::HTMLSelectElement::typeAheadFind): Use TypeAhead.
1894         * html/HTMLSelectElement.h:
1895         (HTMLSelectElement):
1896         * html/TypeAhead.cpp: Added.
1897         (WebCore):
1898         (WebCore::TypeAhead::TypeAhead):
1899         (WebCore::stripLeadingWhiteSpace): Moved from HTMLSelectElement.cpp.
1900         (WebCore::TypeAhead::handleEvent): Returns index for match.
1901         * html/TypeAhead.h: Added.
1902         (WebCore):
1903         (TypeAheadDataSource): Provide the data about the options that TypeAhead should match against.
1904         (TypeAhead):
1905         * html/shadow/DateTimeSymbolicFieldElement.cpp:
1906         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
1907         (WebCore::DateTimeSymbolicFieldElement::handleKeyboardEvent):
1908         (WebCore::DateTimeSymbolicFieldElement::indexOfSelectedOption):
1909         (WebCore):
1910         (WebCore::DateTimeSymbolicFieldElement::optionCount):
1911         (WebCore::DateTimeSymbolicFieldElement::optionAtIndex):
1912         * html/shadow/DateTimeSymbolicFieldElement.h:
1913         (DateTimeSymbolicFieldElement):
1914
1915 2012-11-29  Andrei Bucur  <abucur@adobe.com>
1916
1917         [CSS Regions] Fix content node renderers ordering inside the named flow thread
1918         https://bugs.webkit.org/show_bug.cgi?id=103501
1919
1920         Reviewed by David Hyatt.
1921
1922         This patch fixes two issues with how content nodes renderers are added to a named flow thread.
1923         The first issue was about determining the insertion position of a renderer inside the children list of a named flow thread. Before this patch, the
1924         insertion point was based on both the DOM ordering of the elements and insertion order of previous renderers.
1925         The patch fixes this and makes the renderer position just a function of the DOM ordering of elements.
1926         The second issue appeared when next/previousRenderer methods were skipping nodes because they had the flow-into property as a side effect
1927         of copying the style of the parent element (e.g. Text nodes). The patch ensures the skipped nodes are also elements.
1928
1929         Tests: fast/regions/named-flow-content-order-1.html
1930                fast/regions/named-flow-content-order-2.html
1931                fast/regions/named-flow-content-order-3.html
1932
1933         * dom/NodeRenderingContext.cpp:
1934         (WebCore::NodeRenderingContext::nextRenderer): Skip only elements.
1935         (WebCore::NodeRenderingContext::previousRenderer): Skip only elements.
1936         * rendering/RenderNamedFlowThread.cpp:
1937         (WebCore::RenderNamedFlowThread::addFlowChild): Insert the renderer in the list based on the DOM position of the owner element.
1938         * rendering/RenderNamedFlowThread.h:
1939         (RenderNamedFlowThread):
1940         * rendering/RenderObject.cpp:
1941         (WebCore::RenderObject::renderNamedFlowThreadWrapper): Rename to eliminate the confusion with enclosingRenderFlowThread.
1942         (WebCore::RenderObject::insertedIntoTree):
1943         (WebCore::RenderObject::willBeRemovedFromTree):
1944         * rendering/RenderObject.h:
1945         (RenderObject):
1946
1947 2012-11-28  Mike West  <mkwst@chromium.org>
1948
1949         Add a test to ensure that 'seamless' iframes do not inherit contenteditable.
1950         https://bugs.webkit.org/show_bug.cgi?id=95890
1951
1952         Reviewed by Ojan Vafai.
1953
1954         We don't currently support inheriting contenteditable into a seamless
1955         frame. http://html5.org/tools/web-apps-tracker?from=7318&to=7319
1956         brought the spec in line with WebKit's behavior (ha!). This patch
1957         defends the behavior by adding a test, and removes a FIXME comment
1958         now that the question is settled.
1959
1960         It also exposes a brand new bug: https://bugs.webkit.org/show_bug.cgi?id=103539
1961         How exciting.
1962
1963         Test: fast/frames/seamless/seamless-contenteditable-not-inherited.html
1964
1965         * css/StyleResolver.cpp:
1966         (WebCore::StyleResolver::styleForDocument):
1967             No functional change, just dropping a FIXME comment.
1968
1969 2012-11-28  Mike West  <mkwst@chromium.org>
1970
1971         Web Inspector: Console message's anchor element should be trimmed for readability.
1972         https://bugs.webkit.org/show_bug.cgi?id=100095
1973
1974         Reviewed by Pavel Feldman.
1975
1976         We're currently trimming URLs that go through
1977         'WebInspector.linkifyURLAsNode' down to 150 characters total. Not all
1978         URLs go that path, however. We were missing a few cases that dropped
1979         back to the default Linkifier (which especially showed up for "Live"
1980         anchor elements).
1981
1982         This patch ensures that anything using WebInspector.Linkifier is also
1983         trimmed by default. It adds a new constant to do so in order to avoid
1984         magic numbers in the code.
1985
1986         Test: http/tests/inspector/network/script-as-text-loading-long-url.html
1987
1988         * inspector/front-end/Linkifier.js:
1989         (WebInspector.Linkifier):
1990             Pass the max length into the default formatter that's created and
1991             stored when creating a 'WebInspector.Linkifier' object.
1992         * inspector/front-end/ResourceUtils.js:
1993         (WebInspector.linkifyURLAsNode):
1994             Use the new maxlength constant rather than hard-coding 150.
1995
1996 2012-11-28  Kentaro Hara  <haraken@chromium.org>
1997
1998         Unreviewed. Rebaselined run-bindings-tests.
1999
2000         * bindings/scripts/test/V8/V8TestNode.h:
2001         (WebCore::toV8Fast):
2002
2003 2012-11-28  Shinya Kawanaka  <shinyak@chromium.org>
2004
2005         [Shadow] ShadowRoot should cache InsertionPointList.
2006         https://bugs.webkit.org/show_bug.cgi?id=103212
2007
2008         Reviewed by Hajime Morita.
2009
2010         When distributing or invalidating distribution, we used to traverse all descendent nodes in Shadow DOM.
2011         If ShadowRoot has a InsertionPoint list, we can just traverse the list.
2012
2013         No new tests, should be covered by existing tests.
2014
2015         * dom/ShadowRoot.cpp:
2016         (WebCore::ShadowRoot::insertionPointList):
2017         (WebCore):
2018         * dom/ShadowRoot.h:
2019         (ShadowRoot):
2020         * html/shadow/ContentDistributor.cpp:
2021         (WebCore::ShadowRootContentDistributionData::ShadowRootContentDistributionData):
2022         (WebCore::ShadowRootContentDistributionData::invalidateInsertionPointList):
2023         (WebCore):
2024         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList): Creates InsertionPoint list
2025         if it's not created and return it.
2026         (WebCore::ContentDistributor::distribute): Traverse InsertionPointList instead of all descendent nodes in Shadow DOM.
2027         (WebCore::ContentDistributor::invalidate): ditto.
2028         * html/shadow/ContentDistributor.h:
2029         (WebCore::ShadowRootContentDistributionData::incrementNumberOfShadowElementChildren): Invalidate InsertionPointList cache.
2030         (WebCore::ShadowRootContentDistributionData::decrementNumberOfShadowElementChildren): ditto.
2031         (WebCore::ShadowRootContentDistributionData::incrementNumberOfContentElementChildren): ditto.
2032         (WebCore::ShadowRootContentDistributionData::decrementNumberOfContentElementChildren): ditto.
2033         (ShadowRootContentDistributionData):
2034
2035 2012-11-28  Michael Pruett  <michael@68k.org>
2036
2037         IndexedDB: Remove duplicate toWireString() and createFromWire() methods in JSC SerializedScriptValue
2038         https://bugs.webkit.org/show_bug.cgi?id=103554
2039
2040         Reviewed by Kentaro Hara.
2041
2042         In r135022, duplicate createFromWire() and toWireString() methods
2043         were added to the JSC version of SerializedScriptValue. In
2044         order to allow the JSC SerializedScriptValue to compile when
2045         ENABLE(INDEXED_DATABASE) is turned on, these new methods have
2046         been removed and the old methods have been moved outside the
2047         ENABLE(INDEXED_DATABASE) guard.
2048
2049         No new tests. No change in functionality.
2050
2051         * WebCore.exp.in:
2052         * bindings/js/SerializedScriptValue.cpp:
2053         (WebCore::SerializedScriptValue::toWireString):
2054         (WebCore):
2055         (WebCore::SerializedScriptValue::createFromWire):
2056         * bindings/js/SerializedScriptValue.h:
2057
2058 2012-11-28  Hajime Morrita  <morrita@google.com>
2059
2060         [Shadow DOM] Element.createShadowRoot() should be prefixed.
2061         https://bugs.webkit.org/show_bug.cgi?id=103595
2062
2063         Reviewed by Kentaro Hara.
2064
2065         No new tests, updated shadow-aware-create-shadow-root.html to follow the change.
2066
2067         * dom/Element.idl:
2068
2069 2012-11-28  Hayato Ito  <hayato@chromium.org>
2070
2071         Node::compareDocumentPosition returns wrong value for a node in the different shadow tree.
2072         https://bugs.webkit.org/show_bug.cgi?id=103502
2073
2074         Reviewed by Dimitri Glazkov.
2075
2076         Make Node::compareDocumentPosition() return the correct value when two nodes are in the different shadow trees.
2077
2078         Test: fast/dom/shadow/compare-document-position.html
2079
2080         * dom/Node.cpp:
2081         (WebCore::Node::compareDocumentPosition):
2082
2083 2012-11-28  Joshua Bell  <jsbell@chromium.org>
2084
2085         [Chromium] IndexedDB: Assert/crash in indexing layout tests in content_shell
2086         https://bugs.webkit.org/show_bug.cgi?id=103562
2087
2088         Reviewed by Tony Chang.
2089
2090         In multi-process ports, an commit request or setIndexesReady request may arrive from the
2091         front-end after the back-end has already aborted. Don't freak out if those occur.
2092
2093         Tests: storage/indexeddb/index-population.html
2094                storage/indexeddb/lazy-index-population.html
2095                storage/indexeddb/transaction-error.html
2096
2097         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2098         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys): Ensure transaction hasn't finished before continuing.
2099         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady): Ditto.
2100         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2101         (WebCore::IDBTransactionBackendImpl::commit): Ignore a commit request if already aborted.
2102
2103 2012-11-28  Shinya Kawanaka  <shinyak@chromium.org>
2104
2105         [Shadow] Move Distribution requirements from ShadowRoot
2106         https://bugs.webkit.org/show_bug.cgi?id=103481
2107
2108         Reviewed by Hajime Morita.
2109
2110         We would like to shrink the ShadowRoot memory size in this patch. ShadowRoot had several distribution related members,
2111         however they were used only if ShadowRoot has <content>, <shadow>, or nested ShadowRoot.
2112         Since <input> or <textarea> do not have such requirements, the members consume a few amount of memory.
2113
2114         We remove them from ShadowRoot and introduce some RareData-like data structure for ShadowRoot.
2115         This will reduce memory footprint in most cases.
2116
2117         No new tests, refactoring.
2118
2119         * WebCore.exp.in:
2120         * dom/ShadowRoot.cpp:
2121         (SameSizeAsShadowRoot): Reduced 3 * sizeof(unsigned) bytes from ShadowRoot.
2122         (WebCore::ShadowRoot::ShadowRoot): DistributionData is created only when necessary. <input> or <textarea> won't
2123         create such data.
2124         (WebCore::ShadowRoot::assignedTo):
2125         (WebCore):
2126         (WebCore::ShadowRoot::setAssignedTo):
2127         (WebCore::ShadowRoot::ensureDistributionData):
2128         (WebCore::ShadowRoot::registerShadowElement):
2129         (WebCore::ShadowRoot::unregisterShadowElement):
2130         (WebCore::ShadowRoot::hasShadowInsertionPoint):
2131         (WebCore::ShadowRoot::registerContentElement):
2132         (WebCore::ShadowRoot::unregisterContentElement):
2133         (WebCore::ShadowRoot::hasContentElement):
2134         (WebCore::ShadowRoot::registerElementShadow):
2135         (WebCore::ShadowRoot::unregisterElementShadow):
2136         (WebCore::ShadowRoot::hasElementShadow):
2137         (WebCore::ShadowRoot::countElementShadow):
2138         (WebCore::ShadowRoot::reportMemoryUsage):
2139         * dom/ShadowRoot.h:
2140         (WebCore):
2141         (ShadowRoot):
2142         (WebCore::ShadowRoot::distributionData):
2143         * html/shadow/ContentDistributor.cpp:
2144         (WebCore::ShadowRootContentDistributionData::ShadowRootContentDistributionData):
2145         (WebCore):
2146         * html/shadow/ContentDistributor.h:
2147         (ShadowRootContentDistributionData): Distribution related fields in ShadowRoot are moved to here.
2148         (WebCore::ShadowRootContentDistributionData::insertionPointAssignedTo):
2149         (WebCore::ShadowRootContentDistributionData::setInsertionPointAssignedTo):
2150         (WebCore::ShadowRootContentDistributionData::incrementNumberOfShadowElementChildren):
2151         (WebCore::ShadowRootContentDistributionData::decrementNumberOfShadowElementChildren):
2152         (WebCore::ShadowRootContentDistributionData::numberOfShadowElementChildren):
2153         (WebCore::ShadowRootContentDistributionData::incrementNumberOfContentElementChildren):
2154         (WebCore::ShadowRootContentDistributionData::decrementNumberOfContentElementChildren):
2155         (WebCore::ShadowRootContentDistributionData::numberOfContentElementChildren):
2156         (WebCore::ShadowRootContentDistributionData::incrementNumberOfElementShadowChildren):
2157         (WebCore::ShadowRootContentDistributionData::decrementNumberOfElementShadowChildren):
2158         (WebCore::ShadowRootContentDistributionData::numberOfElementShadowChildren):
2159         (WebCore):
2160
2161 2012-11-23  Dirk Schulze  <krit@webkit.org>
2162
2163         Remove -webkit-mask-attachment
2164         https://bugs.webkit.org/show_bug.cgi?id=67137
2165
2166         Reviewed by David Hyatt.
2167
2168         Remove CSS property '-webkit-attachment'. The CSS WG agreed that this should not be
2169         part of the CSS Masking specification. WebKit never implemented the behavior of
2170         attached masks either. The property was just exposed in CSSOM.
2171
2172         Test: Added negative tests to fast/masking/parsing-mask.html.
2173
2174         * css/CSSComputedStyleDeclaration.cpp:
2175         (WebCore):
2176         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2177         * css/CSSParser.cpp:
2178         (WebCore::CSSParser::parseValue):
2179         (WebCore::CSSParser::parseFillProperty):
2180         * css/CSSProperty.cpp:
2181         (WebCore::CSSProperty::isInheritedProperty):
2182         * css/CSSPropertyNames.in:
2183         * css/StyleBuilder.cpp:
2184         (WebCore::StyleBuilder::StyleBuilder):
2185         * css/StylePropertySet.cpp:
2186         (WebCore::StylePropertySet::asText):
2187         * css/StylePropertyShorthand.cpp:
2188         (WebCore::webkitMaskShorthand):
2189         * css/StyleResolver.cpp:
2190         (WebCore::StyleResolver::applyProperty):
2191         * rendering/style/RenderStyle.h:
2192
2193 2012-11-28  Michael Pruett  <michael@68k.org>
2194
2195         IndexedDB: Add forward declaration of SecurityOrigin to IDBBackingStore.h
2196         https://bugs.webkit.org/show_bug.cgi?id=103578
2197
2198         Reviewed by Kentaro Hara.
2199
2200         Add forward declaration of SecurityOrigin to IDBBackingStore.h
2201         in order to enable compilation of IndexedDB for JSC.
2202
2203         Tests: storage/indexeddb/*
2204
2205         * Modules/indexeddb/IDBBackingStore.h:
2206         (WebCore):
2207
2208 2012-11-28  Hajime Morrita  <morrita@google.com>
2209
2210         checkAcceptChild() needs fewer virtual calls
2211         https://bugs.webkit.org/show_bug.cgi?id=103372
2212
2213         Reviewed by Ojan Vafai.
2214
2215         This change reorganizes checkAcceptChild family for speed.
2216
2217         - Made Node::checkAddChild and Node::checkReplaceChild() static inline functions
2218           in ContainerNode.cpp. checkAcceptChild() was also moved to the same file. This allows us
2219           more aggressive inlining.
2220
2221         - Added a fast path in checkAcceptChild(), where we can assume that the parent is element
2222           and the new child is element or text. Under this assumption, we need no extra type checks
2223           and just needs a cycle prevention through Node::contains(). This is faster than current generic version.
2224
2225         - Moved extra checks from checkAddChild() and checkReplaceChild() to
2226           checkAcceptChild(). This allows the fast path skips even these extra checks.
2227
2228         - Node::canReplaceChild() is devirtualized. Since the only override is on
2229           Document, we can check isDocumentNode() to call it directly.
2230
2231         - The default implemenation of Node::canReplaceChild() just calls isChildTypeAllowed().
2232           That is what an extra check for checkAddChild() did. So we can share these code path in checkAcceptChild().
2233
2234         This gains 2-3% win on Dromaeo dom-modify.html.
2235
2236         No new tests, covered by existing tests.
2237
2238         * dom/ContainerNode.cpp:
2239         (WebCore::isChildTypeAllowed): Moved from Node.cpp
2240         (WebCore::checkAcceptChild): Moved from Node.cpp, Added a fast path.
2241         (WebCore::checkAddChild): Moved from Node.cpp
2242         (WebCore::checkReplaceChild): Moved from Node.cpp
2243         (WebCore::ContainerNode::insertBefore): Followed the signature change.
2244         (WebCore::ContainerNode::replaceChild): Followed the signature change, moved null check from checkReplaceChild to here.
2245         (WebCore::ContainerNode::appendChild): Followed the signature change.
2246         * dom/Document.h:
2247         (Document):
2248         * dom/Node.cpp:
2249         * dom/Node.h:
2250         (WebCore::Node::isDocumentTypeNode): Added for better readability of call sites.
2251
2252 2012-11-28  Kenichi Ishibashi  <bashi@chromium.org>
2253
2254         StyleResolver should not set NaN to font size
2255         https://bugs.webkit.org/show_bug.cgi?id=99506
2256
2257         Reviewed by Abhishek Arya.
2258
2259         fixedScaleFactor could be NaN since settings->defaultFixedFontSize()
2260         and settings->defaultFontSize() are zero in some case. This turns
2261         out setting NaN to font size. Add a zero checks so that
2262         fixedScaleFactor won't be NaN.
2263
2264         Test: fast/css/font-size-nan.html
2265
2266         * css/StyleResolver.cpp:
2267         (WebCore::StyleResolver::checkForGenericFamilyChange):
2268
2269 2012-11-28  Tim Horton  <timothy_horton@apple.com>
2270
2271         [mac] WebHTMLConverter should maintain font size even when there is no related NSFont
2272         https://bugs.webkit.org/show_bug.cgi?id=103568
2273
2274         Reviewed by Alexey Proskuryakov.
2275
2276         WebHTMLConverter should use the default font at the correct size when it
2277         encounters a font that cannot be backed by an NSFont (e.g. a WebFont).
2278
2279         * platform/mac/HTMLConverter.mm:
2280         (+[WebHTMLConverter editingAttributedStringFromRange:]):
2281
2282 2012-11-23  Dirk Schulze  <krit@webkit.org>
2283
2284         CSS parser does not support -webkit-mask-size for -webkit-mask shorthand
2285         https://bugs.webkit.org/show_bug.cgi?id=103020
2286
2287         Reviewed by David Hyatt.
2288
2289         Harmonize the syntax of '-webkit-mask' property with 'background' according to the
2290         CSS Masking specification[1]. This should make it easier to maintain both shorthand
2291         properties in the long term.
2292         It is very unlikely that a lot of content (if any) is affected by this change. The
2293         computed style still is not implemented and this change should rather make it easier
2294         for developers.
2295
2296         With the harmonization, the '-webkit-mask-size' property is part of the shorthand as
2297         well now.
2298
2299         parsing-mask.html covers all the changes. Added new tests for the changed syntax and
2300         '-webkit-mask-size'
2301
2302         [1] http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property
2303
2304         * css/CSSParser.cpp:
2305         (WebCore::CSSParser::parseValue):
2306         (WebCore::CSSParser::parseFillShorthand):
2307         * css/StylePropertySet.cpp:
2308         (WebCore::StylePropertySet::getLayeredShorthandValue):
2309         * css/StylePropertyShorthand.cpp:
2310         (WebCore::webkitMaskShorthand):
2311
2312 2012-11-28  Alec Flett  <alecflett@chromium.org>
2313
2314         IndexedDB: Change frontend to call IDBDatabaseBackendInterface::createTransaction()
2315         https://bugs.webkit.org/show_bug.cgi?id=102732
2316
2317         Reviewed by Tony Chang.
2318
2319         Use the new createTransaction, now that it has been stubbed
2320         out. This is part 2 of 3 of a refactor. See
2321         https://bugs.webkit.org/show_bug.cgi?id=102733 for part 3.
2322
2323         No new tests as this refactor simply keeps and propagates a
2324         counter that is currently unused.
2325
2326         * Modules/indexeddb/IDBDatabase.cpp:
2327         (WebCore::IDBDatabase::nextTransactionId):
2328         (WebCore):
2329         (WebCore::IDBDatabase::transaction):
2330         * Modules/indexeddb/IDBDatabase.h:
2331         (IDBDatabase):
2332         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2333         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2334         * Modules/indexeddb/IDBRequest.cpp:
2335         (WebCore::IDBRequest::onSuccess):
2336         * Modules/indexeddb/IDBTransaction.cpp:
2337         (WebCore::IDBTransaction::create):
2338         (WebCore::IDBTransaction::IDBTransaction):
2339         * Modules/indexeddb/IDBTransaction.h:
2340         (IDBTransaction):
2341
2342 2012-11-28  Michael Saboff  <msaboff@apple.com>
2343
2344         HTMLFontElement font size parsing should directly handle 8 bit strings
2345         https://bugs.webkit.org/show_bug.cgi?id=103315
2346
2347         Reviewed by Oliver Hunt.
2348
2349         Split parseFontSize() into a templated function based on character type and a wrapper that determines
2350         a string's bitness before calling the template.
2351
2352         No new tests. No change in functionality.
2353
2354         * html/HTMLFontElement.cpp:
2355         (WebCore::parseFontSize):
2356
2357 2012-11-28  Robert Kroeger  <rjkroege@chromium.org>
2358
2359         remove unused PlatformGestureCurve code
2360         https://bugs.webkit.org/show_bug.cgi?id=103296
2361
2362         Reviewed by Adam Barth.
2363
2364         Previous CLs have made the Chromium embedder provide gesture fling
2365         curve implementation to WebKit. Consequently no platform uses the
2366         gestural fling code currently found in WebKit. This CL removes this code.
2367
2368         Code removal only: covered by existing tests.
2369
2370         * CMakeLists.txt:
2371         * GNUmakefile.list.am:
2372         * WebCore.gypi:
2373         * platform/ActivePlatformGestureAnimation.cpp: Removed.
2374         * platform/ActivePlatformGestureAnimation.h: Removed.
2375         * platform/PlatformGestureCurve.h: Removed.
2376         * platform/PlatformGestureCurveTarget.h: Removed.
2377         * platform/ScrollAnimatorNone.cpp: References to removed code removed.
2378         * platform/ScrollAnimatorNone.h:
2379         * platform/TouchFlingPlatformGestureCurve.cpp: Removed.
2380         * platform/TouchFlingPlatformGestureCurve.h: Removed.
2381         * platform/WheelFlingPlatformGestureCurve.cpp: Removed.
2382         * platform/WheelFlingPlatformGestureCurve.h: Removed.
2383         * platform/chromium/support/PlatformGestureCurveFactory.cpp: Removed.
2384         * platform/chromium/support/PlatformGestureCurveFactory.h: Removed.
2385         * platform/chromium/support/WebFlingAnimatorToGestureCurveAdapter.h: Removed.
2386
2387 2012-11-28  Abhishek Arya  <inferno@chromium.org>
2388
2389         Heap-use-after-free in WebCore::EventHandler::handleMousePressEvent
2390         https://bugs.webkit.org/show_bug.cgi?id=101098
2391
2392         Reviewed by Adam Barth.
2393
2394         |subframe| can be blown away inside passMousePressEventToSubframe
2395         call. Use RefPtr to protect it in handleMousePressEvent function.
2396         We use similar approach in handleMouseMoveEvent function.
2397
2398         No new tests. Test is extremely time dependent and needs to trigger
2399         interaction gesture. Reproduced on ClusterFuzz.
2400
2401         * page/EventHandler.cpp:
2402         (WebCore::EventHandler::handleMousePressEvent):
2403
2404 2012-11-28  Tom Sepez  <tsepez@chromium.org>
2405
2406         XSSAuditor bypass with script src=data: URL ending in <!--
2407         https://bugs.webkit.org/show_bug.cgi?id=103548
2408
2409         Reviewed by Adam Barth.
2410
2411         This fixes an additional case where characters from the page itself are
2412         included with the snippet to match against the reflected vector, and the
2413         JS remains legitimate because of a <!--- comment. Truncate the snippet at
2414         such a comment.
2415         
2416         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url3.html
2417
2418         * html/parser/XSSAuditor.cpp:
2419         (WebCore::XSSAuditor::decodedSnippetForAttribute):
2420
2421 2012-11-28  Abhishek Arya  <inferno@chromium.org>
2422
2423         Heap-use-after-free in WebCore::RenderLayerModelObject::hasSelfPaintingL
2424 ayer
2425         https://bugs.webkit.org/show_bug.cgi?id=101970
2426
2427         Reviewed by David Hyatt.
2428
2429         RenderInline::splitFlow and RenderBlock::splitFlow re-use |pre|
2430         block in some cases. In those cases, |pre| might hold floating objects
2431         and those floating descendants might get moved to |post| block. If
2432         the |pre| block does not get a layout later, then the floating
2433         descendant will never get removed since it is now part of |post|
2434         ancestor chain. We don't want failing-to-layout bugs turned into
2435         security bugs and hence clear floating objects list since we expect
2436         it to be rebuilt in subsequent layout.
2437
2438         Test: fast/block/float/float-not-removed-from-pre-block.html
2439
2440         * rendering/RenderBlock.cpp:
2441         (WebCore::RenderBlock::splitFlow): Call removeFloatingObjects on |pre| block.
2442         (WebCore::RenderBlock::removeFloatingObjects): Clear all floating objects from our list.
2443         (WebCore):
2444         * rendering/RenderBlock.h: 
2445         (RenderBlock):
2446         * rendering/RenderInline.cpp:
2447         (WebCore::RenderInline::splitFlow): Call removeFloatingObjects on |pre| block.
2448
2449 2012-11-28  Mark Pilgrim  <pilgrim@chromium.org>
2450
2451         [Chromium] Remove pluginsScriptableObject from PlatformSupport
2452         https://bugs.webkit.org/show_bug.cgi?id=103542
2453
2454         Reviewed by Adam Barth.
2455
2456         Part of a refactoring series. See tracking bug 82948.
2457
2458         * bindings/v8/ScriptController.cpp:
2459         (WebCore::ScriptController::createScriptInstanceForWidget):
2460         * platform/chromium/PlatformSupport.h:
2461         (PlatformSupport):
2462         * plugins/PluginViewBase.h:
2463         (PluginViewBase):
2464         (WebCore::PluginViewBase::scriptableObject):
2465
2466 2012-11-28  Otto Derek Cheung  <otcheung@rim.com>
2467
2468         [BlackBerry] CookieJarBlackBerry will use document settings for cookiesEnabled
2469         https://bugs.webkit.org/show_bug.cgi?id=103560
2470
2471         Reviewed by Rob Buis.
2472
2473         PR 253490
2474
2475         CookieJarBlackBerry will now use page settings to check whether
2476         cookie is enabled.
2477
2478         Tested setting/reading cookies on different client cookie settings using
2479         javascript and HTTP. Cookie behaviour is now back to spec.
2480
2481         * loader/blackberry/CookieJarBlackBerry.cpp:
2482         (WebCore::cookies):
2483         (WebCore::cookieRequestHeaderFieldValue):
2484
2485 2012-11-28  Mark Pilgrim  <pilgrim@chromium.org>
2486
2487         [Chromium][Win] Remove ensureFontLoaded from PlatformSupport
2488         https://bugs.webkit.org/show_bug.cgi?id=97696
2489
2490         Reviewed by Adam Barth.
2491
2492         Move ensureFontLoaded() from PlatformSupport to
2493         FontPlatformDataChromiumWin. Part of a refactoring series; see
2494         tracking bug 82948.
2495
2496         * platform/chromium/PlatformSupport.h:
2497         (PlatformSupport):
2498         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2499         (WebCore::fontContainsCharacter):
2500         * platform/graphics/chromium/FontChromiumWin.cpp:
2501         (WebCore::drawGlyphsWin):
2502         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
2503         (WebCore::FontPlatformData::scriptFontProperties):
2504         (WebCore):
2505         (WebCore::FontPlatformData::ensureFontLoaded):
2506         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
2507         (FontPlatformData):
2508         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
2509         (WebCore::getGlyphIndices):
2510         (WebCore::fillBMPGlyphs):
2511         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
2512         (WebCore::SimpleFontData::platformInit):
2513         (WebCore::SimpleFontData::determinePitch):
2514         (WebCore::SimpleFontData::platformBoundsForGlyph):
2515         (WebCore::SimpleFontData::platformWidthForGlyph):
2516         * platform/graphics/chromium/UniscribeHelperTextRun.cpp:
2517         (WebCore::UniscribeHelperTextRun::tryToPreloadFont):
2518         * platform/graphics/skia/SkiaFontWin.cpp:
2519         (WebCore::paintSkiaText):
2520
2521 2012-11-28  peavo@outlook.com  <peavo@outlook.com>
2522
2523         [WinCairo] Crash when requesting favicon.
2524         https://bugs.webkit.org/show_bug.cgi?id=102689
2525
2526         Reviewed by Brent Fulgham.
2527
2528         * platform/graphics/BitmapImage.h: Made frameCount() method virtual, subclasses made for testing can then override it.
2529         * platform/graphics/win/ImageCairoWin.cpp:
2530         (WebCore::BitmapImage::getHBITMAPOfSize): Added NULL pointer check.
2531         (WebCore::BitmapImage::drawFrameMatchingSourceSize): Added NULL pointer check.
2532
2533 2012-11-28  Tony Chang  <tony@chromium.org>
2534
2535         Move internals.settings.setPageScaleFactor to internals.setPageScaleFactor
2536         https://bugs.webkit.org/show_bug.cgi?id=103559
2537
2538         Reviewed by Jochen Eisinger.
2539
2540         This method doesn't alter the Settings object, so move it to internals.
2541
2542         No new tests, this is a refactor.
2543
2544         * testing/InternalSettings.cpp: Remove.
2545         * testing/InternalSettings.h: Remove.
2546         * testing/InternalSettings.idl: Remove.
2547         * testing/Internals.cpp:
2548         (WebCore::Internals::resetToConsistentState): Add reset code.
2549         (WebCore::Internals::setPageScaleFactor): Add method.
2550         * testing/Internals.h: Add method.
2551         * testing/Internals.idl: Add method.
2552
2553 2012-11-28  Alexandru Chiculita  <achicu@adobe.com>
2554
2555         [CSS Regions] Elements using transforms are not repainted correctly when rendered in a region
2556         https://bugs.webkit.org/show_bug.cgi?id=102826
2557
2558         Reviewed by Dave Hyatt.
2559
2560         Follow up update of a comment after the patch was landed by the commit queue in r135921.
2561
2562         * rendering/RenderObject.cpp:
2563         (WebCore::RenderObject::containerForRepaint):
2564
2565 2012-11-28  Christophe Dumez  <christophe.dumez@intel.com>
2566
2567         CSS3 Multicolumn: column-span should accept value 'none' (instead of '1')
2568         https://bugs.webkit.org/show_bug.cgi?id=101462
2569
2570         Reviewed by David Hyatt.
2571
2572         According to the latest CSS3 Multi-column specification:
2573         http://www.w3.org/TR/2011/CR-css3-multicol-20110412/#column-span
2574
2575         column-span should accept values [ none | all ], instead of
2576         [ 1 | all ]. This patch updates WebKit implementation to reflect
2577         this change in the specification. The value 1 is still supported
2578         for compatibility reasons and is mapped to none.
2579
2580         No new tests, already covered by existing tests.
2581
2582         * css/CSSComputedStyleDeclaration.cpp:
2583         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2584         * css/CSSParser.cpp:
2585         (WebCore::CSSParser::parseValue):
2586         * css/CSSPrimitiveValueMappings.h:
2587         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2588         (WebCore::CSSPrimitiveValue::operator ColumnSpan):
2589         * rendering/style/RenderStyle.h:
2590         * rendering/style/RenderStyleConstants.h:
2591
2592 2012-11-28  Anton Vayvod  <avayvod@chromium.org>
2593
2594         Text Autosizing: Clusters should use width of LCA of their text nodes
2595         https://bugs.webkit.org/show_bug.cgi?id=102562
2596
2597         Reviewed by Kenneth Rohde Christiansen.
2598
2599         Many pages set a max-width on their content. So especially for the
2600         RenderView, instead of just taking the width of |cluster| we find
2601         the lowest common ancestor of the first and last descendant text node of
2602         the cluster (i.e. the deepest wrapper block that contains all the text),
2603         and use its width instead.
2604
2605         Tests: fast/text-autosizing/cluster-with-narrow-lca-and-cluster.html
2606                fast/text-autosizing/cluster-with-narrow-lca.html
2607                fast/text-autosizing/cluster-with-wide-lca.html
2608                fast/text-autosizing/list-item-out-of-flow.html
2609                fast/text-autosizing/wide-in-narrow-overflow-scroll.html
2610
2611         * rendering/TextAutosizer.cpp:
2612         (WebCore::TextAutosizer::processCluster): use text nodes LCA instead of cluster for width calculation
2613         (WebCore::TextAutosizer::isAutosizingContainer): list items that are out of parent list element's flow are valid containers (that therefore become clusters in isAutosizingCluster)
2614         (WebCore::TextAutosizer::findDeepestBlockContainingAllText): searches for LCA of text nodes ignoring descendant clusters
2615         (WebCore::TextAutosizer::findFirstTextLeafNotInCluster): searches for the first or the last (depending on specified direction) text leaf node in-order ignoring any descendant clusters
2616         * rendering/TextAutosizer.h: new private methods declarations and an enum for tree traversal direction.
2617
2618 2012-11-28  Sadrul Habib Chowdhury  <sadrul@chromium.org>
2619
2620         cleanup: Change some code to be cleaner, more readable and style conforming
2621         https://bugs.webkit.org/show_bug.cgi?id=103543
2622
2623         Reviewed by Antonio Gomes.
2624
2625         Use more appropriate function name and more meaningful variable names to make the code cleaner.
2626         This is covered by existing tests. This does not make any behavioural changes, so no new tests.
2627
2628         * page/EventHandler.cpp:
2629         (WebCore::closestScrollableNodeInDocumentIfPossible):
2630         (WebCore::EventHandler::handleWheelEvent):
2631
2632 2012-11-28  Alexandru Chiculita  <achicu@adobe.com>
2633
2634         [CSS Regions] Crash when using hover and first-letter inside a flow-thread
2635         https://bugs.webkit.org/show_bug.cgi?id=102957
2636
2637         Reviewed by David Hyatt.
2638
2639         Some RenderObjects use a different path when they are destroyed. That's because they are dynamically
2640         added just before layout happens and their parent is usually not their actual owner. In those cases the parent
2641         will remove the object from the tree, but it's actually the owner that will destroy the object and all its
2642         children.
2643
2644         RenderFlowThread maintains a RenderBoxRegionInfo object for each RenderObject that is rendered inside the
2645         flow-thread. When the RenderObject is removed from the RenderFlowThread, the associated RenderBoxRegionInfo object
2646         also needs to be removed.
2647
2648         In these special cases (list-marker, first-letter), the object itself was removed from the RenderFlowThread,
2649         but its children were still left in the flow-thread. When the these special objects were later destroyed, 
2650         they will remove their own children. Removing their children means it will try to remove them from the
2651         associated RenderFlowThread. However, in this cases there would be no link back to the parent flow-thread,
2652         as the tree is now detached from the enclosing RenderFlowThread.
2653
2654         Added code that recursively removes the whole children tree from the RenderFlowThread when the root is removed.
2655
2656         Tests: fast/regions/firstletter-inside-flowthread.html
2657                fast/regions/listmarker-inside-flowthread.html
2658
2659         * rendering/RenderObject.cpp:
2660         (WebCore::RenderObject::willBeRemovedFromTree):
2661         (WebCore::RenderObject::removeFromRenderFlowThread):
2662         (WebCore):
2663         (WebCore::RenderObject::removeFromRenderFlowThreadRecursive):
2664         * rendering/RenderObject.h:
2665         (RenderObject):
2666
2667 2012-11-28  Alexandru Chiculita  <achicu@adobe.com>
2668
2669         [CSS Regions] Auto-height regions will not calculate the height correctly when the content changes dynamically
2670         https://bugs.webkit.org/show_bug.cgi?id=102954
2671
2672         Reviewed by David Hyatt.
2673
2674         Whenever the flow changes, we need to reset the region computed auto-heights.
2675         However, when we reset the region heights to "auto" or "un-computed", we also need to make
2676         sure that all the region breaks are counted again, so that we split regions correctly during the new layout.
2677         I've reused the m_regionsInvalidated property to force the flow do a complete layout.
2678
2679         Test: fast/regions/autoheight-dynamic-update.html
2680
2681         * rendering/RenderFlowThread.cpp:
2682         (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):
2683
2684 2012-11-28  Alexandru Chiculita  <achicu@adobe.com>
2685
2686         [CSS Regions] InRenderFlowThread returns false in the first setStyle
2687         https://bugs.webkit.org/show_bug.cgi?id=102839
2688
2689         Reviewed by Dave Hyatt.
2690
2691         Some render objects use the "inRenderFlowThread" during the first styleWillChange/styleDidChange.
2692         The first call to these methods comes from NodeRendererFactory::createRenderer. That happens before the RenderObject is 
2693         attached to the parent renderer, meaning that inRenderFlowThread is false. That means a RenderLayerBacking will be 
2694         created for renderers inside the RenderFlowThread, but composited layers inside the RenderFlowThread are not supported yet.
2695         https://bugs.webkit.org/show_bug.cgi?id=84900
2696
2697         Test: fast/repaint/region-painting-composited-element.html
2698
2699         * dom/NodeRenderingContext.cpp:
2700         (WebCore::NodeRendererFactory::createRenderer):
2701         Added code to propagate the inRenderFlowThread flag from the parent node before the style is set for the first time.
2702
2703 2012-11-28  Dan Bernstein  <mitz@apple.com>
2704
2705         <rdar://problem/12645085> REGRESSION (r130851): With kerning enabled, a white-space: pre-wrap inline starting with tab+space has the wrong width
2706         https://bugs.webkit.org/show_bug.cgi?id=103541
2707
2708         Reviewed by Anders Carlsson.
2709
2710         Test: fast/text/tab-with-kerning.html
2711
2712         When kerning is enabled, words are measured with their trailing space, then the width of a
2713         space is subtracted. The logic to do this was incorrectly being invoked even when the
2714         trailing whitespace character was a tab or a newline.
2715
2716         * rendering/RenderBlockLineLayout.cpp:
2717         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to check only for the space
2718         character, not other space-like characters.
2719
2720 2012-11-28  Nate Chapin  <japhet@chromium.org>
2721
2722         Move empty loading to DocumentLoader, simplify FrameLoader::init()
2723         https://bugs.webkit.org/show_bug.cgi?id=101512
2724
2725         Reviewed by Adam Barth.
2726
2727         No new tests, though several outputs changed because we no longer send resource
2728             load callbacks for empty loads.
2729
2730         * loader/DocumentLoader.cpp:
2731         (WebCore::DocumentLoader::DocumentLoader):
2732         (WebCore::DocumentLoader::~DocumentLoader):
2733         (WebCore::DocumentLoader::finishedLoading):
2734         (WebCore::DocumentLoader::commitData):
2735         (WebCore::DocumentLoader::clearMainResourceLoader):
2736         (WebCore::DocumentLoader::isLoadingInAPISense):
2737         (WebCore::DocumentLoader::documentURL):
2738         (WebCore::DocumentLoader::isLoadingMainResource):
2739         (WebCore::DocumentLoader::maybeLoadEmpty):
2740         (WebCore):
2741         (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource
2742              loads directly here.
2743         * loader/DocumentLoader.h:
2744         (WebCore::DocumentLoader::serverRedirectSourceForHistory):
2745         (DocumentLoader):
2746         * loader/FrameLoader.cpp:
2747         (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values
2748             were previously being reset in init(). Given that the FrameLoader is in
2749             an inconsistent state before init() is called anyway, there doesn't seem
2750             to be a disadvantage to just initializing them to their post-init() values.
2751         (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of
2752             doing a bunch of direct calls to functions FrameLoader shouldn't know about.
2753         * loader/FrameLoaderStateMachine.cpp:
2754         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
2755         * loader/FrameLoaderStateMachine.h:
2756         * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load.
2757         (WebCore::MainResourceLoader::loadNow): This only returned true when an empty
2758             load got deferred, which won't happen now. Return void and always treat
2759             as returning false.
2760         * loader/MainResourceLoader.h:
2761         (MainResourceLoader):
2762
2763 2012-11-28  Antoine Quint  <graouts@apple.com>
2764
2765         Calling .removeCue() for a cue that was never added should raise a NOT_FOUND_ERR
2766         https://bugs.webkit.org/show_bug.cgi?id=103412
2767
2768         Reviewed by Eric Carlson.
2769
2770         Updating the .removeCue() implementation to match the latest spec. This means we now
2771         raise a NOT_FOUND_ERR exception when trying to remove a cue that wasn't present in the
2772         cue list instead of a INVALID_STATE_ERR exception like the spec used to mandate.
2773
2774         * html/track/TextTrack.cpp:
2775         (WebCore::TextTrack::removeCue):
2776
2777 2012-11-28  Zeno Albisser  <zeno@webkit.org>
2778
2779         [Qt][Win] Enable usage of QTWEBKIT_PLUGIN_PATH.
2780         https://bugs.webkit.org/show_bug.cgi?id=103529
2781
2782         This patch enables the same behavior for Windows
2783         as it is currently implemented for all other operating
2784         systems supported by Qt.
2785         Directories listed in the environment variable
2786         QTWEBKIT_PLUGIN_PATH are being searched for additional
2787         plugins.
2788         The only difference is that directories on Windows
2789         need to be separated by a semicolon instead of a colon.
2790
2791         Reviewed by Kenneth Rohde Christiansen.
2792
2793         * plugins/win/PluginDatabaseWin.cpp:
2794         (WebCore):
2795         (WebCore::addQtWebKitPluginPath):
2796         (WebCore::PluginDatabase::defaultPluginDirectories):
2797
2798 2012-11-28  Adam Barth  <abarth@webkit.org>
2799
2800         [v8] 4% regression in dom_traverse tests
2801         https://bugs.webkit.org/show_bug.cgi?id=102858
2802
2803         Unreviewed.
2804
2805         This patch is a manual rollout of
2806         http://trac.webkit.org/changeset/134729. We can't do a mechanical
2807         rollout because V8DOMWrapper::getCachedWrapper no longer exists.
2808
2809         * bindings/scripts/CodeGeneratorV8.pm:
2810         (GenerateHeader):
2811
2812 2012-11-28  Denis Nomiyama  <d.nomiyama@samsung.com>
2813
2814         Removed extra definition of GLXContext.
2815         https://bugs.webkit.org/show_bug.cgi?id=103500
2816
2817         Reviewed by Martin Robinson.
2818
2819         A minor cleanup to remove a spare definition of GLXContext in GLContextGLX.h.
2820
2821         No new tests. This doesn't change any behavior.
2822
2823         * platform/graphics/glx/GLContextGLX.h:
2824
2825 2012-11-28  Sadrul Habib Chowdhury  <sadrul@chromium.org>
2826
2827         Fix gesture scrolling when the target-element of scroll-begin is removed
2828         https://bugs.webkit.org/show_bug.cgi?id=103355
2829
2830         Reviewed by Antonio Gomes.
2831
2832         When a touch-scroll starts, the node under the touch-point gets latched, and
2833         subsequent scroll-update events are dispatched to that node. But if the node is
2834         removed while the gesture event is in progress (e.g. in a dynamically updated
2835         list), then the scrolling stops, although there are enough elements to still
2836         enable scrolling. So instead of latching on to the node immediately under the
2837         touch point, latch on to the scrollable node under the touch point.
2838
2839         Test: fast/events/touch/gesture/touch-gesture-scroll-remove-node.html
2840
2841         * page/EventHandler.cpp:
2842         (WebCore::getClosestScrollableNodeInDocumentIfPossible):
2843         (WebCore):
2844         (WebCore::EventHandler::handleWheelEvent):
2845
2846 2012-11-28  Anton Obzhirov  <a.obzhirov@samsung.com>
2847
2848         Fix .libs/libwebkitgtk-3.0.so: undefined reference to `WebCore::validationMessageBadInputForNumberText().
2849         https://bugs.webkit.org/show_bug.cgi?id=103509
2850
2851         Reviewed by Philippe Normand.
2852
2853         GTK build fix after r136001.
2854
2855         * platform/gtk/LocalizedStringsGtk.cpp:
2856         (WebCore::validationMessageBadInputForNumberText):
2857         (WebCore):
2858
2859 2012-11-28  Byungwoo Lee  <bw80.lee@samsung.com>
2860
2861         [EFL] Use mutex locker in wakeUp() to ensure thread-safety.
2862         https://bugs.webkit.org/show_bug.cgi?id=101132
2863
2864         Reviewed by Gyuyoung Kim.
2865
2866         Add mutex locker for the ecore pipe to ensure thread-safety of
2867         RunLoop::wakeUp().
2868
2869         RunLoop::wakeUp() can be called by multiple thread. It uses
2870         ecore_pipe_write() function but the function is not thread-safe.
2871
2872         * platform/RunLoop.h:
2873         (RunLoop):
2874         * platform/efl/RunLoopEfl.cpp:
2875         (WebCore::RunLoop::wakeUp):
2876
2877 2012-11-28  Ryuan Choi  <ryuan.choi@gmail.com>
2878
2879         [EFL] Refactor theme to choose whether to support foreground color of selection
2880         https://bugs.webkit.org/show_bug.cgi?id=102037
2881
2882         Reviewed by Kenneth Rohde Christiansen.
2883
2884         If foreground selection color is supported, selected text is painted to
2885         SelectionForegroundColor instead of text color. If not, text can be painted
2886         to text color.
2887
2888         However, EFL port does not have a way to disable support of foreground
2889         selection color. So this patch refactors color classes of theme from
2890         active and inactive to foreground and background in order to disable support
2891         of foreground selection color when foreground color class is not specified.
2892
2893         * platform/efl/RenderThemeEfl.cpp:
2894         (WebCore::fillColorsFromEdjeClass):
2895         Returned false without error message when colorClass is not specified.
2896         (WebCore::RenderThemeEfl::setColorFromThemeClass):
2897         (WebCore::RenderThemeEfl::loadTheme):
2898         (WebCore::RenderThemeEfl::RenderThemeEfl):
2899         (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
2900         (WebCore):
2901         * platform/efl/RenderThemeEfl.h:
2902         (RenderThemeEfl):
2903
2904 2012-11-28  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2905
2906         Move childrenAffectedBy bits from RenderStyle to Element
2907         https://bugs.webkit.org/show_bug.cgi?id=101448
2908
2909         Unreviewed buildfix.
2910
2911         To use renderStyle() on some Macs we need to include NodeRenderStyle.h.
2912
2913         * dom/ContainerNode.cpp:
2914
2915 2012-11-28  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2916
2917         Move childrenAffectedBy bits from RenderStyle to Element
2918         https://bugs.webkit.org/show_bug.cgi?id=101448
2919         https://bugs.webkit.org/show_bug.cgi?id=98021
2920
2921         Reviewed by Antti Koivisto.
2922
2923         Moves facts observed about restyling dependencies out of RenderStyle and
2924         into RareData for Node and Element. This also enables further cleanup
2925         in related code that tried to deal with problems caused with the placement
2926         of the data.
2927
2928         Test: fast/css/nth-child-not-in-rightmost.html
2929
2930         * css/SelectorChecker.cpp:
2931         (WebCore::SelectorChecker::checkSelector):
2932         (WebCore::SelectorChecker::checkOneSelector):
2933         * css/SiblingTraversalStrategies.h:
2934         (WebCore::DOMSiblingTraversalStrategy::countElementsBefore):
2935         * css/StyleResolver.cpp:
2936         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2937         (WebCore::StyleResolver::canShareStyleWithElement):
2938         (WebCore::parentElementPreventsSharing):
2939         (WebCore::StyleResolver::locateSharedStyle):
2940         * dom/ContainerNode.cpp:
2941         (WebCore::ContainerNode::setActive):
2942         (WebCore::ContainerNode::setHovered):
2943         * dom/Element.cpp:
2944         (WebCore::Element::detach):
2945         (WebCore::Element::recalcStyle):
2946         (WebCore::checkForEmptyStyleChange):
2947         (WebCore::checkForSiblingStyleChanges):
2948         (WebCore::Element::setChildrenAffectedByHover):
2949         (WebCore::Element::setChildrenAffectedByActive):
2950         (WebCore::Element::setChildrenAffectedByDrag):
2951         (WebCore::Element::setChildrenAffectedByFirstChildRules):
2952         (WebCore::Element::setChildrenAffectedByLastChildRules):
2953         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules):
2954         (WebCore::Element::setChildrenAffectedByForwardPositionalRules):
2955         (WebCore::Element::setChildrenAffectedByBackwardPositionalRules):
2956         (WebCore::Element::setChildIndex):
2957         (WebCore::Element::rareDataStyleAffectedByEmpty):
2958         (WebCore::Element::rareDataChildrenAffectedByHover):
2959         (WebCore::Element::rareDataChildrenAffectedByActive):
2960         (WebCore::Element::rareDataChildrenAffectedByDrag):
2961         (WebCore::Element::rareDataChildrenAffectedByFirstChildRules):
2962         (WebCore::Element::rareDataChildrenAffectedByLastChildRules):
2963         (WebCore::Element::rareDataChildrenAffectedByDirectAdjacentRules):
2964         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules):
2965         (WebCore::Element::rareDataChildrenAffectedByBackwardPositionalRules):
2966         (WebCore::Element::rareDataChildIndex):
2967         * dom/Element.h:
2968         (Element):
2969         (WebCore::Element::styleAffectedByEmpty):
2970         (WebCore::Element::childrenAffectedByHover):
2971         (WebCore::Element::childrenAffectedByActive):
2972         (WebCore::Element::childrenAffectedByDrag):
2973         (WebCore::Element::childrenAffectedByPositionalRules):
2974         (WebCore::Element::childrenAffectedByFirstChildRules):
2975         (WebCore::Element::childrenAffectedByLastChildRules):
2976         (WebCore::Element::childrenAffectedByDirectAdjacentRules):
2977         (WebCore::Element::childrenAffectedByForwardPositionalRules):
2978         (WebCore::Element::childrenAffectedByBackwardPositionalRules):
2979         (WebCore::Element::childIndex):
2980         * dom/ElementRareData.h:
2981         (ElementRareData):
2982         (WebCore::ElementRareData::resetComputedStyle):
2983         (WebCore::ElementRareData::resetDynamicRestyleObservations):
2984         * dom/Node.cpp:
2985         (WebCore::Node::diff):
2986         * dom/NodeRareData.h:
2987         (WebCore::NodeRareData::NodeRareData):
2988         (WebCore::NodeRareData::childrenAffectedByHover):
2989         (WebCore::NodeRareData::setChildrenAffectedByHover):
2990         (WebCore::NodeRareData::childrenAffectedByActive):
2991         (WebCore::NodeRareData::setChildrenAffectedByActive):
2992         (WebCore::NodeRareData::childrenAffectedByDrag):
2993         (WebCore::NodeRareData::setChildrenAffectedByDrag):
2994         (NodeRareData):
2995         (WebCore::NodeRareData::childrenAffectedByFirstChildRules):
2996         (WebCore::NodeRareData::setChildrenAffectedByFirstChildRules):
2997         (WebCore::NodeRareData::childrenAffectedByLastChildRules):
2998         (WebCore::NodeRareData::setChildrenAffectedByLastChildRules):
2999         (WebCore::NodeRareData::childrenAffectedByDirectAdjacentRules):
3000         (WebCore::NodeRareData::setChildrenAffectedByDirectAdjacentRules):
3001         (WebCore::NodeRareData::childrenAffectedByForwardPositionalRules):
3002         (WebCore::NodeRareData::setChildrenAffectedByForwardPositionalRules):
3003         (WebCore::NodeRareData::childrenAffectedByBackwardPositionalRules):
3004         (WebCore::NodeRareData::setChildrenAffectedByBackwardPositionalRules):
3005         (WebCore::NodeRareData::childIndex):
3006         (WebCore::NodeRareData::setChildIndex):
3007         * dom/NodeRenderingContext.cpp:
3008         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
3009         * page/TouchAdjustment.cpp:
3010         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
3011         * rendering/RenderObject.cpp:
3012         (WebCore::RenderObject::updateDragState):
3013         * rendering/style/RenderStyle.cpp:
3014         (WebCore::RenderStyle::copyNonInheritedFrom):
3015         * rendering/style/RenderStyle.h:
3016
3017 2012-11-28  Zeno Albisser  <zeno@webkit.org>
3018
3019         GraphicsSurface: Implement usage of GraphicsSurface for WebGL in WK1.
3020         https://bugs.webkit.org/show_bug.cgi?id=103497
3021
3022         Unreviewed buildfix.
3023
3024         Any usage of GraphicsSurface needs to be wrapped with USE(GRAPHICS_SURFACE).
3025
3026         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3027         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3028
3029 2012-11-28  Zeno Albisser  <zeno@webkit.org>
3030
3031         GraphicsSurface: Implement usage of GraphicsSurface for WebGL in WK1.
3032         https://bugs.webkit.org/show_bug.cgi?id=103497
3033
3034         This is a temporary workaround for an issue with GraphicsSurfaceMac.
3035         GraphicsSurfaceMac is currently implemented using CGL only.
3036         CGL does not allow us to properly restore the NSView a context was made current with.
3037         Therefore we have to go through QOpenGLContext to ensure the context
3038         is being restored correctly.
3039         As soon as we are updating GraphicsSurfaceMac to use NSOpenGL,
3040         we should revert this patch.
3041
3042         Reviewed by Simon Hausmann.
3043
3044         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3045         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3046
3047 2012-11-28  Zeno Albisser  <zeno@webkit.org>
3048
3049         GraphicsSurface: Implement usage of GraphicsSurface for WebGL in WK1.
3050         https://bugs.webkit.org/show_bug.cgi?id=103497
3051
3052         Using GraphicsSurface for WebGL in WK1 allows us to share
3053         the code with the WK2 implementation.
3054
3055         Reviewed by Simon Hausmann.
3056
3057         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3058         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3059             Remove obsolete code.
3060         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3061             After blitting the multisample framebuffer,
3062             we can copy the contents onto the GraphicsSurface.
3063             Right after that we can use the GraphicsSurface
3064             as a texture origin to paint to the TextureMapper.
3065             Flags related to flipping and blending are being resolved
3066             by GraphicsSurface, and do not need to be handled here anymore.
3067         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
3068             Remove a redundant makeCurrentIfNeeded call.
3069             The original context is being restored by
3070             blitMultisampleFramebufferAndRestoreContext anyway.
3071             Instead of explicitly calling swapBuffers here,
3072             we call swapBuffers on the GraphicsSurface implicitly
3073             after in GraphicsSurfacePrivate::copyFromTexture().
3074         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
3075             Add members to hold the reading end texture IDs.
3076             The texture on the reading side are in a different
3077             context than the texture on the writing side.
3078             By using GraphicsSurface in WK1 we have to distinguish
3079             between these textures, as a single instance serves
3080             for reading and writing.
3081         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3082         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
3083         (WebCore::GraphicsSurfacePrivate::swapBuffers):
3084         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
3085             Add an implicit call to swapBuffers().
3086         (WebCore::GraphicsSurfacePrivate::frontBufferTextureID):
3087         (GraphicsSurfacePrivate):
3088         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
3089         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3090             Add a flag to distinguish between sending and receiving/reading
3091             side of the surface. This flag is being initialized in the constructor
3092             which is the only place where we know if an instance will be used for
3093             writing or reading.
3094             The purpose of this flag is to avoid erroneously swapping the buffers
3095             on the reading side. We can no longer rely on m_xPixmap for this purpose.
3096         (WebCore::GraphicsSurfacePrivate::swapBuffers):
3097         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
3098         (WebCore::GraphicsSurfacePrivate::glxPixmap):
3099             Lazily create the GLX pixmap on demand.
3100         (GraphicsSurfacePrivate):
3101         (WebCore::GraphicsSurface::platformImport):
3102
3103 2012-11-28  Roger Fong  <roger_fong@apple.com>
3104
3105         Unreviewed. Fix extra spaces in SimpleFontData::initGDIFont().
3106
3107         * platform/graphics/win/SimpleFontDataWin.cpp:
3108         (WebCore::SimpleFontData::initGDIFont):
3109
3110 2012-11-28  Dan Carney  <dcarney@google.com>
3111
3112         [V8] Crash wrapping media element when MediaPlayer isn't available
3113         https://bugs.webkit.org/show_bug.cgi?id=103431
3114
3115         Reviewed by Kentaro Hara.
3116
3117         Call HTMLElement::createWrapper directly when dispatching a
3118         disabled MediaElement wrap.
3119
3120         No new tests. Testing this must apparently be manual.
3121
3122         * bindings/scripts/CodeGeneratorV8.pm:
3123         (GenerateHeader):
3124         * dom/make_names.pl:
3125         (printWrapperFunctions):
3126         (printWrapperFactoryHeaderFile):
3127
3128 2012-11-28  Roger Fong  <roger_fong@apple.com>
3129
3130         Initialize identity matrix in SimpleFontData::initGDIFont() properly.
3131         https://bugs.webkit.org/show_bug.cgi?id=103499
3132         <rdar://problem/12400700>
3133
3134         Reviewed by Timothy Horton.
3135
3136         We are incorrectly initializing the matrix passed into GetGlyphOutline.
3137         This patch fixes MAT2 initialization to match the way we initialize the 
3138         identity matrix in SimpleFontData::boundsForGDIGlyph and SimpleFontData::widthForGDIGlyph.
3139
3140         * platform/graphics/win/SimpleFontDataWin.cpp:
3141         (WebCore::SimpleFontData::initGDIFont):
3142
3143 2012-11-28  Huang Dongsung  <luxtella@company100.net>
3144
3145         [Texmap] REGRESSION(r135620) QtTestBrowser crashes on Google-gravity.
3146         https://bugs.webkit.org/show_bug.cgi?id=103410
3147
3148         Reviewed by Noam Rosenthal.
3149
3150         GraphicsLayerTextureMapper::updateBackingStore() should return early
3151         before TextureMapper is set.
3152
3153         GraphicsLayer::FlushCompositingState() can be called by RenderLayerBacking. It
3154         means this method can be called before creating TextureMapper. So
3155         TextureMapperLayer::flushCompositingState() checks and returns early if
3156         TextureMapper was not created.
3157
3158         However, GraphicsLayerTextureMapper::updateBackingStore() expects that TextureMapper
3159         always exists. updateBackingStore should also return early when TextureMapper
3160         was not created.
3161
3162         No new tests. Covered by existing tests.
3163
3164         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3165         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
3166         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
3167         (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
3168         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
3169
3170 2012-11-28  Tommy Widenflycht  <tommyw@google.com>
3171
3172         Add basic implementation for MediaStreamAudioDestinationNode
3173         https://bugs.webkit.org/show_bug.cgi?id=101815
3174
3175         Reviewed by Chris Rogers.
3176
3177         Implements an audio destination node which has a MediaStream.
3178         This can be added to a PeerConnection with peerConnection.addStream().
3179         Please see use case (3):
3180         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html
3181
3182         Test: webaudio/mediastreamaudiodestinationnode.html
3183
3184         * Modules/webaudio/AudioContext.cpp:
3185         (WebCore):
3186         (WebCore::AudioContext::createMediaStreamDestination):
3187         * Modules/webaudio/AudioContext.h:
3188         (WebCore):
3189         (AudioContext):
3190         * Modules/webaudio/AudioContext.idl:
3191         * Modules/webaudio/AudioNode.h:
3192         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: Added.
3193         (WebCore):
3194         (WebCore::MediaStreamAudioDestinationNode::create):
3195         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
3196         (WebCore::MediaStreamAudioDestinationNode::mediaStreamSource):
3197         (WebCore::MediaStreamAudioDestinationNode::~MediaStreamAudioDestinationNode):
3198         (WebCore::MediaStreamAudioDestinationNode::process):
3199         (WebCore::MediaStreamAudioDestinationNode::reset):
3200         * Modules/webaudio/MediaStreamAudioDestinationNode.h: Added.
3201         (WebCore):
3202         (MediaStreamAudioDestinationNode):
3203         (WebCore::MediaStreamAudioDestinationNode::stream):
3204         * Modules/webaudio/MediaStreamAudioDestinationNode.idl: Added.
3205         * WebCore.gypi:
3206         * platform/audio/AudioDestinationConsumer.h: Copied from Source/WebCore/platform/mediastream/MediaStreamSource.cpp.
3207         (WebCore):
3208         (AudioDestinationConsumer):
3209         (WebCore::AudioDestinationConsumer::~AudioDestinationConsumer):
3210         * platform/chromium/support/WebMediaStreamSource.cpp:
3211         (WebKit::WebMediaStreamSource::extraData):
3212         (WebKit::WebMediaStreamSource::setExtraData):
3213         (WebKit::WebMediaStreamSource::requiresAudioConsumer):
3214         (WebKit):
3215         (ConsumerWrapper):
3216         (WebKit::ConsumerWrapper::create):
3217         (WebKit::ConsumerWrapper::consumer):
3218         (WebKit::ConsumerWrapper::ConsumerWrapper):
3219         (WebKit::ConsumerWrapper::consumeAudio):
3220         (WebKit::WebMediaStreamSource::addAudioConsumer):
3221         (WebKit::WebMediaStreamSource::removeAudioConsumer):
3222         * platform/mediastream/MediaStreamSource.cpp:
3223         (WebCore::MediaStreamSource::create):
3224         (WebCore::MediaStreamSource::MediaStreamSource):
3225         (WebCore::MediaStreamSource::addAudioConsumer):
3226         (WebCore):
3227         (WebCore::MediaStreamSource::removeAudioConsumer):
3228         (WebCore::MediaStreamSource::consumeAudio):
3229         * platform/mediastream/MediaStreamSource.h:
3230         (WebCore):
3231         (MediaStreamSource):
3232         (WebCore::MediaStreamSource::requiresAudioConsumer):
3233         (WebCore::MediaStreamSource::audioConsumers):
3234
3235 2012-11-27  Mike West  <mkwst@chromium.org>
3236
3237         Improve WebSocketChannel connection failure console messages.
3238         https://bugs.webkit.org/show_bug.cgi?id=103448
3239
3240         Reviewed by Adam Barth.
3241
3242         When a WebSocket connection fails, the current implementation of
3243         WebSocketChannel::fail binds the generated console message to the
3244         document's URL, but doesn't give much indication as to the connection
3245         itself. This patch adjusts the console message to explicitly show the
3246         URL of the failed connection to give developers a better chance of
3247         debugging and resolving errors.
3248
3249         * Modules/websockets/WebSocketChannel.cpp:
3250         (WebCore::WebSocketChannel::fail):
3251             Drop the URL parameter from addConsoleMessage, in favour of adding
3252             the WebSocketHandshake's URL to the message text.
3253
3254 2012-11-27  Zan Dobersek  <zandobersek@gmail.com>
3255
3256         Unreviewed functionality fix, return the height in ImageFrame::height()
3257         on non-Skia platforms.
3258
3259         * platform/image-decoders/ImageDecoder.h:
3260         (WebCore::ImageFrame::height):
3261
3262 2012-11-27  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
3263
3264         Optimization in image decoding
3265         https://bugs.webkit.org/show_bug.cgi?id=88424
3266
3267         Reviewed by Brent Fulgham.
3268
3269         Optimization in image decoding.
3270         Reduce branching and multiplications in GIF image decoding loops and functions.
3271         Rebase and update of original patch by Misha Tyutyunik <michael.tyuytunik@nokia.com>
3272
3273         Covered by existing tests.
3274
3275         * platform/image-decoders/gif/GIFImageDecoder.cpp:
3276         (WebCore::GIFImageDecoder::haveDecodedRow):
3277
3278 2012-11-27  Michael Saboff  <msaboff@apple.com>
3279
3280         TextIterator unnecessarily converts 8 bit strings to 16 bits
3281         https://bugs.webkit.org/show_bug.cgi?id=103295
3282
3283         Reviewed by Brent Fulgham.
3284
3285         Changed TextIterator to use the contained string instead of calling characters() on that string.
3286         Other sources of text, like emitCharacter() still use the contained UChar* buffer.
3287         Added appendTextToStringBuilder() to append the text contents of the current iterator to a string builder
3288         irrespective of the source of the text.
3289
3290         No new tests as functionality covered by existing tests.
3291
3292         * WebCore.exp.in: Updated plainText export and eliminated plainTextToMallocAllocatedBuffer export
3293         * accessibility/AccessibilityObject.cpp:
3294         (WebCore::AccessibilityObject::stringForVisiblePositionRange): Updated to use TextIterator::appendTextToStringBuilder()
3295         * editing/TextIterator.cpp:
3296         (WebCore::TextIterator::characterAt): New function to return the indexed character of the current TextIterator
3297         (WebCore::TextIterator::appendTextToStringBuilder): Added method to append whatever the current text to a StringBuilder
3298         (WebCore::TextIterator::emitText): Eliminated accessing the character data via characters().
3299         (WebCore::TextIterator::rangeFromLocationAndLength): Changed to use characterAt().
3300         (WebCore::plainText): Combined with plainTextToMallocAllocatedBuffer().
3301         * editing/TextIterator.h:
3302         (WebCore::TextIterator::startOffset): New getter.
3303         (WebCore::TextIterator::string): New getter.
3304         (WebCore::TextIterator::characters): Updated to use correct test source.
3305         * page/ContextMenuController.cpp:
3306         (WebCore::selectionContainsPossibleWord): Changed to use characterAt().
3307
3308 2012-11-27  Noel Gordon  <noel.gordon@gmail.com>
3309
3310         Inline ImageFrame width() and height()
3311         https://bugs.webkit.org/show_bug.cgi?id=103401
3312
3313         Reviewed by Brent Fulgham.
3314
3315         Inline ImageFrame width() and height() to improve the performance of ImageFrame
3316         function getAddr(x,y) per https://bugs.webkit.org/show_bug.cgi?id=88424#c38
3317
3318         No new tests. Covered by many existing tests.
3319
3320         * platform/image-decoders/ImageDecoder.cpp: Remove width() and height() routines
3321         since they now inlined in the ImageFrame class definition in ImageDecoder.h.
3322         * platform/image-decoders/ImageDecoder.h: Add inline definitions of width() and
3323         height() for all ports.
3324         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
3325         (WebCore::ImageFrame::width): Remove.
3326         (WebCore::ImageFrame::height): Remove.
3327
3328 2012-11-27  Michael Pruett  <michael@68k.org>
3329
3330         Remove ASSERT_NOT_REACHED() from IDBCursorBackendImpl::postSuccessHandlerCallback()
3331         https://bugs.webkit.org/show_bug.cgi?id=103461
3332
3333         Reviewed by Kentaro Hara.
3334
3335         The assertion is applicable only to the Chromium port.
3336
3337         Tests: storage/indexeddb/*
3338
3339         * Modules/indexeddb/IDBCursorBackendImpl.h:
3340         (WebCore::IDBCursorBackendImpl::postSuccessHandlerCallback):
3341
3342 2012-11-27  Shinya Kawanaka  <shinyak@chromium.org>
3343
3344         [Refactoring] HasSelectorForClassStyleFunctor in Element.cpp seems verbose
3345         https://bugs.webkit.org/show_bug.cgi?id=103474
3346
3347         Reviewed by Hajime Morita.
3348
3349         The code introduced in r135174 looks verbose. We would like to make it simpler.
3350         We have removed several inline functions and unnecessary structs.
3351
3352         No new tests, simple refactoring.
3353
3354         * dom/Element.cpp:
3355         (WebCore):
3356         (WebCore::checkSelectorForClassChange):
3357         (WebCore::Element::classAttributeChanged):
3358         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
3359
3360 2012-11-27  Julien Chaffraix  <jchaffraix@webkit.org>
3361
3362         Support proper <percent> / calc() resolution for grid items
3363         https://bugs.webkit.org/show_bug.cgi?id=102968
3364
3365         Reviewed by Ojan Vafai.
3366
3367         This change introduces a mechanism similar to logical height / width override
3368         but for containing block. This is required as we don't have a renderer for the
3369         grid area but any <percent> or calc() size should be resolved against the grid
3370         area size (which is sized after the grid tracks).
3371
3372         Tests: fast/css-grid-layout/calc-resolution-grid-item.html
3373                fast/css-grid-layout/percent-resolution-grid-item.html
3374                fast/css-grid-layout/percent-grid-item-in-percent-grid-track.html
3375                fast/css-grid-layout/percent-grid-item-in-percent-grid-track-in-percent-grid.html
3376
3377         * rendering/RenderBox.cpp:
3378         (WebCore::RenderBox::willBeDestroyed):
3379         Remove any containing block size override.
3380
3381         (WebCore::RenderBox::overrideContainingBlockContentLogicalWidth):
3382         (WebCore::RenderBox::overrideContainingBlockContentLogicalHeight):
3383         (WebCore::RenderBox::hasOverrideContainingBlockLogicalWidth):
3384         (WebCore::RenderBox::hasOverrideContainingBlockLogicalHeight):
3385         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalWidth):
3386         (WebCore::RenderBox::setOverrideContainingBlockContentLogicalHeight):
3387         (WebCore::RenderBox::clearContainingBlockOverrideSize):
3388         Containing block override size functions.
3389
3390         (WebCore::RenderBox::containingBlockLogicalWidthForContent):
3391         Updated the function to check for any override logical width.
3392
3393         (WebCore::RenderBox::containingBlockLogicalHeightForContent):
3394         New function, similar to RenderBox::containingBlockLogicalWidthForContent.
3395
3396         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
3397         (WebCore::RenderBox::computePercentageLogicalHeight):
3398         Updated these function to return overrideContainingBlockContentLogicalHeight as needed.
3399
3400         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3401         (WebCore::RenderBox::availableLogicalHeightUsing):
3402         Updated these functions to use the new containingBlockLogicalHeightForContent instead
3403         of availableLogicalHeight.
3404
3405         * rendering/RenderBox.h:
3406         Added the previous new functions.
3407
3408         * rendering/RenderGrid.cpp:
3409         (WebCore::RenderGrid::layoutGridItems):
3410         Updated to override the containing block size so that we properly size our grid items.
3411
3412 2012-11-27  Kent Tamura  <tkent@chromium.org>
3413
3414         Fix build errors by r135955.
3415
3416         * dom/ShadowRoot.cpp: Use struct instead of class.
3417         * dom/TreeScope.cpp: Ditto.
3418
3419 2012-11-27  Eugene Klyuchnikov  <eustas@chromium.com>
3420
3421         Web Inspector: [Timeline] "Show CPU activity on the ruler" settings checkbox does not take effect until Inspector restart
3422         https://bugs.webkit.org/show_bug.cgi?id=102210
3423
3424         Reviewed by Pavel Feldman.
3425
3426         The checkbox changes should take effect in the real time.
3427
3428         * inspector/front-end/SettingsScreen.js:
3429         (WebInspector.GenericSettingsTab):
3430         Do not show checkpox if browser is not capable.
3431         * inspector/front-end/TimelinePanel.js:
3432         Added setting change listener.
3433
3434 2012-11-27  Andreas Kling  <akling@apple.com>
3435
3436         Compile time size assertions for TreeScope, ShadowRoot and ElementAttributeData.
3437
3438         Rubber-stamped by Anders Carlsson.
3439
3440         * dom/ShadowRoot.cpp:
3441         (SameSizeAsShadowRoot):
3442         * dom/TreeScope.cpp:
3443         (SameSizeAsTreeScope):
3444         * dom/ElementAttributeData.cpp: Derp.
3445
3446 2012-11-27  James Simonsen  <simonjam@chromium.org>
3447
3448         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
3449         https://bugs.webkit.org/show_bug.cgi?id=102151
3450
3451         Reviewed by Adam Barth.
3452
3453         There's a FIXME that we have too many FrameLoader::load*() functions. This patch consolidates 3 into 1.
3454         There are still a few more load functions that will be consolidated later. Using FrameLoadRequest as
3455    &n