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