d0620e7d0ca79167339c9d2a9919d24bcaecb93b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-03  Adam Klein  <adamk@chromium.org>
2
3         [HTMLTemplateElement] Disallow cycles within template content
4         https://bugs.webkit.org/show_bug.cgi?id=105066
5
6         Reviewed by Ojan Vafai.
7
8         Cycles in <template> content aren't quite as bad as cycles in normal
9         DOM trees, but they can easily cause crashes, e.g. in cloneNode and
10         innerHTML.
11
12         Shadow DOM has an analagous issue, and this patch tackles that problem
13         at the same time by creating a new method, Node::containsIncludingHostElements.
14
15         In order to disallow cycles, the HTMLTemplateElement.content
16         DocumentFragment needs a pointer to its host. The approach here
17         creates a new subclass with a host pointer and a new virtual method
18         to DocumentFragment to identify the subclass.
19
20         To avoid unnecessary virtual function calls, also changed how
21         Document::templateContentsOwnerDocument works to allow fast inlined
22         access and avoid lazy creation when not needed.
23
24         Tests: fast/dom/HTMLTemplateElement/cycles-in-shadow.html
25                fast/dom/HTMLTemplateElement/cycles.html
26                fast/dom/shadow/shadow-hierarchy-exception.html
27
28         * GNUmakefile.list.am:
29         * Target.pri:
30         * WebCore.vcproj/WebCore.vcproj:
31         * WebCore.xcodeproj/project.pbxproj:
32         * dom/ContainerNode.cpp:
33         (WebCore::isInTemplateContent):
34         (WebCore::containsConsideringHostElements):
35         (WebCore::checkAcceptChild):
36         * dom/Document.cpp:
37         (WebCore::Document::ensureTemplateContentsOwnerDocument): Renamed to make clear that it lazily creates the Document. Updated all existing callers to call this method.
38         * dom/Document.h:
39         (Document):
40         (WebCore::Document::templateContentsOwnerDocument): Fast, inlined accessor for use in checkAcceptChild().
41         * dom/DocumentFragment.h:
42         (WebCore::DocumentFragment::isTemplateContent):
43         * dom/Node.cpp:
44         (WebCore::Node::containsIncludingShadowDOM): made const, simplified
45         (WebCore::Node::containsIncludingHostElements): Specialized version of Node::contains that knows how to jump over template content boundaries.
46         * dom/Node.h:
47         (Node):
48         * dom/TemplateContentDocumentFragment.h: Added.
49         (TemplateContentDocumentFragment): Subclass of DocumentFragment which stores its host template element.
50         (WebCore::TemplateContentDocumentFragment::create):
51         (WebCore::TemplateContentDocumentFragment::host):
52         (WebCore::TemplateContentDocumentFragment::TemplateContentDocumentFragment):
53         * editing/markup.cpp:
54         (WebCore::createFragmentForInnerOuterHTML):
55         * html/HTMLTemplateElement.cpp:
56         (WebCore::HTMLTemplateElement::content): Construct the new subclass.
57
58 2013-01-02  Jon Lee  <jonlee@apple.com>
59
60         Revert auto-start plugins to snapshotted plugins after a period of inactivity
61         https://bugs.webkit.org/show_bug.cgi?id=105973
62         <rdar://problem/12947865>
63
64         Reviewed by Brady Eidson.
65
66         * html/HTMLPlugInElement.h:
67         (WebCore::HTMLPlugInElement::plugInOriginHash): Expose publicly for WebKit2.
68         Reorganize the protected members of the class.
69         * html/HTMLPlugInImageElement.h: Move the member to HTMLPlugInElement.
70
71 2013-01-03  Alexis Menard  <alexis@webkit.org>
72
73         Querying transition-timing-function value on the computed style does not return keywords when it should.
74         https://bugs.webkit.org/show_bug.cgi?id=105442
75
76         Reviewed by Simon Fraser.
77
78         http://www.w3.org/TR/css3-transitions/#transition-timing-function-property
79         contains a set of predefined timing functions which under the hood are
80         implemented using cubic-bezier but it's an implementation detail that
81         should not be exposed. It seems to be more clear to return a CSS
82         keyword rather than the cubic-bezier form when querying the value of
83         the property on the computed style. In fact the spec even say that for
84         example the initial value is "ease" and not cubic-bezier(0.25, 0.1,
85         0.25, 1.0). We could also imagine that in the future these predefined
86         values could contain other values not represented by a cubic-bezier
87         form. This behavior also align with the "linear" keyword which return
88         "linear" rather than cubic-bezier(0.0, 0.0, 1.0, 1.0).
89
90         Test: transitions/transitions-parsing.html has been updated to cover
91         the new behavior as well as making sure that an explicitly set value of
92         cubic-bezier(0.25, 0.1, 0.25, 1.0) does not return "ease" but the
93         cubic-bezier() form.
94
95         * css/CSSComputedStyleDeclaration.cpp:
96         (WebCore::createAnimationValue):
97         (WebCore):
98         (WebCore::getTimingFunctionValue):
99         * css/CSSToStyleMap.cpp:
100         (WebCore::CSSToStyleMap::mapAnimationTimingFunction):
101         * platform/animation/TimingFunction.h:
102         (WebCore::CubicBezierTimingFunction::create):
103         (CubicBezierTimingFunction):
104         (WebCore::CubicBezierTimingFunction::operator==):
105         (WebCore::CubicBezierTimingFunction::timingFunctionPreset): Store the
106         preset value of the timing function if it is one when creating it 
107         so we can use it later from the computed style.
108         (WebCore::CubicBezierTimingFunction::CubicBezierTimingFunction):
109
110 2013-01-03  Tony Chang  <tony@chromium.org>
111
112         Generate internal.settings from Settings.in
113         https://bugs.webkit.org/show_bug.cgi?id=104740
114
115         Reviewed by Adam Barth.
116
117         If the setting is declared in Settings.in and is a basic type, generate a
118         setter function at internals.settings.
119
120         InternalSettingsGenerated.idl is created by make_settings.pl. InternalSettings.idl
121         inherits from InternalSettingsGenerated.idl so we can override generated functions if
122         needed or add additional custom setters.
123
124         This patch removes 2 password echo methods from InternalSettings.idl since they are
125         auto generated. There are other methods we could remove, but I'll do that in a followup.
126
127         No new tests, existing tests should pass. Specifically, editing/input/password* tests should pass.
128
129         * CMakeLists.txt: Add generated cpp file to the testing lib.
130         * DerivedSources.make: Add generated idl file and specify all the outputs of make_settings.pl
131         * DerivedSources.pri: Generate idl file before generating bindings and include generated idl
132         for bindings generation.
133         * GNUmakefile.am: Specify all the generated files of make_settings.pl. Add generated idl to
134         list of files to be processed and resulting output to be compiled.
135         * UseJSC.cmake: Add generated idl file to list of idl files to process.
136         * UseV8.cmake: Same as UseJSC.cmake.
137         * WebCore.gyp/WebCore.gyp: Run make_settings.pl earlier so we can run the output through the
138         bindings generator.
139         * WebCore.gypi: Add new files.
140         * WebCore.vcproj/WebCoreTestSupport.vcproj: Add new files.
141         * WebCore.xcodeproj/project.pbxproj: Add new files.
142         * bindings/scripts/CodeGenerator.pm:
143         (IDLFileForInterface): Add current directory to the include path so DerivedSources.make can
144         find the generated idl file.
145         * page/make_settings.pl:
146         (generateCode): Generate InternalSettingsGenerated.{idl,h,cpp}.
147         (generateSettingsMacrosHeader): Rename since we're generating 2 headers now.
148         (setterFunctionName): Helper function for naming a setter.
149         (printGetterAndSetter): Use setterFunctionName.
150         (enumerateParsedItems): Helper function that visits each parsed item.
151         (generateInternalSettingsIdlFile): Generate idl file.
152         (generateInternalSettingsHeaderFile): Generate header file.
153         (generateInternalSettingsCppFile): Generate C++ file.
154         * testing/InternalSettings.cpp:
155         (WebCore::InternalSettings::Backup::Backup): Remove password echo members.
156         (WebCore::InternalSettings::Backup::restoreTo): Remove password echo members.
157         (InternalSettingsWrapper): We can't use RefCountedSupplemental because we're we're already
158         RefCounted. Create a wrapper class to wrap the RefCounted InternalSettings for Supplement<>::provideTo,
159         which uses an OwnPtr.
160         (WebCore::InternalSettingsWrapper::InternalSettingsWrapper): Wraps an InternalSettings that the Page can own.
161         (WebCore::InternalSettingsWrapper::~InternalSettingsWrapper): Clear's m_page when the Page goes away.
162         (WebCore::InternalSettingsWrapper::internalSettings): Unwrap InternalSettings.
163         (WebCore::InternalSettings::from): Update to use InternalSettingsWrapper.
164         (WebCore::InternalSettings::InternalSettings): Call base class constructor.
165         (WebCore::InternalSettings::resetToConsistentState): Renamed from reset() and pass through to base class.
166         Also remove unnecessary pageScaleFactor reset (done in Internals::resetToConsistentState).
167         * testing/InternalSettings.h:
168         (Backup): Remove password echo members.
169         (WebCore::InternalSettings::create): Create an instance instead of using new.
170         (WebCore::InternalSettings::hostDestroyed): Clear the page. This is similar to the code that
171         RefCountedSupplemental has.
172         * testing/InternalSettings.idl: Extends InternalSettingsGenerated.
173         * testing/js/WebCoreTestSupport.cpp:
174         (WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
175         * testing/v8/WebCoreTestSupport.cpp:
176         (WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
177         Remove an unused header.
178
179 2013-01-03  Rik Cabanier  <cabanier@adobe.com>
180
181         Canvas blending tests fail on Mac WK2
182         https://bugs.webkit.org/show_bug.cgi?id=105943
183
184         Reviewed by Simon Fraser.
185
186         Tests that now pass: 
187             LayoutTests/fast/canvas/canvas-blend-solid.html 
188             LayoutTests/fast/canvas/canvas-blend-image.html
189
190         * testing/InternalSettings.cpp:
191         (WebCore::InternalSettings::Backup::Backup):
192         (WebCore::InternalSettings::Backup::restoreTo):
193         * testing/InternalSettings.h:
194         (Backup):
195
196 2013-01-03   Arko Saha  <arko@motorola.com>
197
198         Microdata: Fix build failure after r137003
199         https://bugs.webkit.org/show_bug.cgi?id=106023
200
201         Reviewed by Ryosuke Niwa.
202
203         Set HTMLCollection::namedPropertyGetter as named property getter for
204         HTMLPropertiesCollection in GenerateImplementationNamedPropertyGetter.
205
206         * bindings/scripts/CodeGeneratorV8.pm:
207         (GenerateImplementationNamedPropertyGetter):
208         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
209         (WebCore::V8HTMLCollection::namedPropertyGetter):
210
211 2013-01-03  Adam Klein  <adamk@chromium.org>
212
213         Clear failed image loads when an <img> is adopted into a different document
214         https://bugs.webkit.org/show_bug.cgi?id=104409
215
216         Reviewed by Nate Chapin.
217
218         This avoids an assertion failure setImageWithoutConsideringPendingLoadEvent().
219
220         Test: loader/image-loader-adoptNode-assert.html
221
222         * loader/ImageLoader.cpp:
223         (WebCore::ImageLoader::updateFromElement): Use new helper.
224         (WebCore::ImageLoader::updateFromElementIgnoringPreviousError): ditto
225         (WebCore::ImageLoader::elementDidMoveToNewDocument): ditto
226         (WebCore::ImageLoader::clearFailedLoadURL): Added a helper method to self-document the code.
227         (WebCore):
228         * loader/ImageLoader.h:
229         (ImageLoader):
230
231 2013-01-03  Vincent Scheib  <scheib@chromium.org>
232
233         Sandbox-blocked pointer lock should log to the console.
234         https://bugs.webkit.org/show_bug.cgi?id=105794
235
236         Reviewed by Adrienne Walker.
237
238         When pointer lock is requested and is denied due to sandbox restrictions
239         a helpful message to web developers is sent to the developer console.
240
241         Existing test expectations updated.
242
243         * page/PointerLockController.cpp:
244         (WebCore::PointerLockController::requestPointerLock):
245
246 2013-01-03  Tom Sepez  <tsepez@chromium.org>
247
248         PingLoader.h missing virtual and OVERRIDE keywords on its inherited methods.
249         https://bugs.webkit.org/show_bug.cgi?id=105975
250
251         Reviewed by Nate Chapin.
252
253         Change adds compile-time checks only, so no new tests.
254
255         * loader/PingLoader.h:
256         (PingLoader):
257         (WebCore::PingLoader::timeout):
258
259 2013-01-02  Levi Weintraub  <leviw@chromium.org>
260
261         Fix incorrect assumption about in-flow descendants of inlines in touch event rect tracking
262         https://bugs.webkit.org/show_bug.cgi?id=105970
263
264         Reviewed by Simon Fraser.
265
266         Correcting the touch event target rect accumulation code to no longer incorrectly assume that
267         non-block renderers held only normal-flow children. The updated code will always walk the
268         complete renderer sub-tree, but only do the work of calculating the absolute rect when the
269         child won't necessarily fall inside its parent (floating, positioned, or transformed).
270
271         Tests: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html updated to catch bug.
272
273         * page/scrolling/ScrollingCoordinator.cpp:
274         (WebCore::accumulateRendererTouchEventTargetRects): Walk all renderer sub-trees. Also keeping
275         track of the last added parent container rect to avoid adding redundant rectangles.
276         (WebCore::accumulateDocumentEventTargetRects): Avoiding adding empty rects.
277
278 2013-01-03  Joshua Bell  <jsbell@chromium.org>
279
280         IndexedDB: Simplify IDBTransactionBackendImpl::scheduleTask usage
281         https://bugs.webkit.org/show_bug.cgi?id=103536
282
283         Reviewed by Tony Chang.
284
285         Move responsibility for firing abort errors from requests that arrive on the
286         back-end after an asynchronous transaction abort out of WebCore, since the
287         front-end takes care of this as far as script is concerned.
288
289         No new tests -  no behavior changes.
290
291         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
292         (WebCore::IDBCursorBackendImpl::continueFunction):
293         (WebCore::IDBCursorBackendImpl::advance):
294         (WebCore::IDBCursorBackendImpl::prefetchContinue):
295         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
296         (WebCore::IDBIndexBackendImpl::openCursor):
297         (WebCore::IDBIndexBackendImpl::openKeyCursor):
298         (WebCore::IDBIndexBackendImpl::count):
299         (WebCore::IDBIndexBackendImpl::get):
300         (WebCore::IDBIndexBackendImpl::getKey):
301         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
302         (WebCore::IDBObjectStoreBackendImpl::get):
303         (WebCore::IDBObjectStoreBackendImpl::put):
304         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
305         (WebCore::IDBObjectStoreBackendImpl::clear):
306         (WebCore::IDBObjectStoreBackendImpl::openCursor):
307         (WebCore::IDBObjectStoreBackendImpl::count):
308
309 2013-01-03  Tiancheng Jiang  <tijiang@rim.com>
310
311         Update BB10 media render theme.
312         https://bugs.webkit.org/show_bug.cgi?id=105728
313
314         Reviewed by Yong Li.
315
316         Internally Reviewed by John Griggs.
317
318         Update GL friendly render method for audio volume.
319         Change the background color for embedded media player to semi-transparent.
320         Change remaining time font color to grey to match full screen video.
321         Change media slider thumb color to blue when pressed.
322
323         * css/mediaControlsBlackBerry.css:
324         (audio):
325         (audio::-webkit-media-controls-embedded-panel, video::-webkit-media-controls-embedded-panel):
326         (video::-webkit-media-controls-time-display-container, audio::-webkit-media-controls-time-display-container):
327         (video::-webkit-media-controls-timeline-container, audio::-webkit-media-controls-timeline-container):
328         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
329         (video::-webkit-media-controls-time-remaining-display, audio::-webkit-media-controls-time-remaining-display):
330         (audio::-webkit-media-controls-volume-slider-container):
331         * platform/blackberry/RenderThemeBlackBerry.cpp:
332         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
333         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
334
335 2013-01-03  Sheriff Bot  <webkit.review.bot@gmail.com>
336
337         Unreviewed, rolling out r138640.
338         http://trac.webkit.org/changeset/138640
339         https://bugs.webkit.org/show_bug.cgi?id=106019
340
341         Causing crashes in multiply() (Requested by danakj on
342         #webkit).
343
344         * platform/graphics/transforms/TransformationMatrix.cpp:
345         (WebCore):
346         (WebCore::TransformationMatrix::multiply):
347         * platform/graphics/transforms/TransformationMatrix.h:
348         (TransformationMatrix):
349
350 2013-01-03  Mike West  <mkwst@chromium.org>
351
352         The 'body' of seamless IFrames should default to 'margin: 0'
353         https://bugs.webkit.org/show_bug.cgi?id=90834
354
355         Reviewed by Antti Koivisto.
356
357         Documents displayed in seamless iframes should override the 'body'
358         element's normal 8px default margins with 0px, in order to ensure that
359         contents are displayed flush with the boundries of the seamless box.[1]
360
361         This patch does so by adding a new pseudoclass to allow the user agent
362         stylesheet to specify a different margin for seamless documents.
363
364         [1]: http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0039.html
365
366         Test: fast/frames/seamless/seamless-body-margin.html
367
368         * css/CSSSelector.cpp:
369         (WebCore::CSSSelector::pseudoId):
370         (WebCore::nameToPseudoTypeMap):
371         (WebCore::CSSSelector::extractPseudoType):
372         * css/CSSSelector.h:
373         * css/SelectorChecker.cpp:
374         (WebCore::SelectorChecker::checkOneSelector):
375         * css/html.css:
376         (body:-webkit-seamless-document):
377         * rendering/style/RenderStyleConstants.h:
378             Define a new pseudoclass: '-webkit-seamless-document', which
379             matches for any element in a document that's rendered in a
380             seamless IFrame.
381
382 2013-01-03  Mike West  <mkwst@chromium.org>
383
384         seamless iframes don't inherit styles when srcdoc is used
385         https://bugs.webkit.org/show_bug.cgi?id=103539
386
387         Reviewed by Antti Koivisto.
388
389         Seamless iframes populated via a 'srcdoc' attribute should always
390         inherit styles from their parent documents. At the moment, this is
391         only the case when they contain a stylesheet or some other markup
392         that forces a style recalculation on the document. Simple 'srcdoc'
393         attributes (e.g. "srcdoc='<p>This is a comment.</p>'") bail out of
394         recalculating style early, resulting in unstyled appearance.
395
396         This patch instructs WebCore to treat seamless documents as having an
397         updated StyleResolver regardless of what actions the parser takes,
398         which in turn ensures that the document's style is recalculated
399         correctly.
400
401         Test: fast/frames/seamless/seamless-srcdoc.html
402
403         * dom/Document.cpp:
404         (WebCore::Document::implicitOpen):
405             If it's a seamless document, notify it that its StyleResolver isn't
406             what it might have expected.
407
408 2013-01-03  Allan Sandfeld Jensen  <allan.jensen@digia.com>
409
410         [Qt] Implement SimpleFontData::platformBoundsForGlyph
411         https://bugs.webkit.org/show_bug.cgi?id=104127
412
413         Reviewed by Jocelyn Turcotte.
414
415         Implements platformBoundsForGlyph which is necessary for working MathML and Ruby.
416
417         * platform/graphics/qt/SimpleFontDataQt.cpp:
418         (WebCore::SimpleFontData::platformBoundsForGlyph):
419
420 2013-01-02  Steve Block  <steveblock@chromium.org>
421
422         Remove superfluous 'IntPoint toPoint(const IntSize&)'
423         https://bugs.webkit.org/show_bug.cgi?id=105993
424
425         Reviewed by Eric Seidel.
426
427         Refactoring only, no change in behavior.
428
429         * accessibility/AccessibilityObject.cpp:
430         (WebCore::AccessibilityObject::elementAccessibilityHitTest):
431         * accessibility/AccessibilityRenderObject.cpp:
432         (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest):
433         * page/EventHandler.cpp:
434         (WebCore::EventHandler::handleDrag):
435         * page/scrolling/ScrollingCoordinator.cpp:
436         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
437         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
438         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
439         * platform/graphics/IntPoint.h:
440         * rendering/RenderLayer.cpp:
441         (WebCore::RenderLayer::scrollToOffset):
442         (WebCore::RenderLayer::offsetFromResizeCorner):
443         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
444
445 2013-01-02  Huang Dongsung  <luxtella@company100.net>
446
447         [TexMap] Remove m_size in TextureMapperLayer.
448         https://bugs.webkit.org/show_bug.cgi?id=105781
449
450         Reviewed by Noam Rosenthal.
451
452         m_size is duplicated by State::size, so this patch removes it.
453
454         No new tests. Refactoring only.
455
456         * platform/graphics/texmap/TextureMapperLayer.cpp:
457         (WebCore::TextureMapperLayer::computeTransformsRecursive):
458         (WebCore::TextureMapperLayer::paintSelf):
459         (WebCore::TextureMapperLayer::isVisible):
460         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
461         * platform/graphics/texmap/TextureMapperLayer.h:
462         (WebCore::TextureMapperLayer::layerRect):
463         (TextureMapperLayer):
464
465 2013-01-02  Kenneth Russell  <kbr@google.com>
466
467         [chromium] Creation of dedicated workers (isolates) leaks reference to HTMLDocument
468         https://bugs.webkit.org/show_bug.cgi?id=105367
469
470         Reviewed by Dmitry Titov.
471
472         Eliminated a Chromium-specific object wrapping WorkerMessagingProxy in order to fix a
473         lifetime management bug, which leaked every Document which started a dedicated worker.
474
475         Test: fast/workers/worker-document-leak.html
476
477         * workers/WorkerLoaderProxy.h:
478         (WorkerLoaderProxy):
479             Added Chromium-specific casting method to bridge two now-distinct class hierarchies.
480         * workers/WorkerMessagingProxy.h:
481         (WorkerMessagingProxy):
482             Made destructor protected instead of private to allow subclassing.
483
484 2013-01-02  Elliott Sprehn  <esprehn@chromium.org>
485
486         Make ClassList::reset's purpose obvious and don't keep quirks string when not needed
487         https://bugs.webkit.org/show_bug.cgi?id=105963
488
489         Reviewed by Ojan Vafai.
490
491         ClassList::reset only exists to handle updating the special SpaceSplitString
492         for quirks mode documents. This adds a new method that makes this obvious and
493         instead of updating the string immediately clear the value and lazily
494         update it. We also clear the value whenever we're inserted into the
495         document so that when moving from a quirks mode document to a non-quirks
496         mode document we don't keep the SpaceSplitString around if it's not needed.
497
498         No new tests, I'm not sure how to write a test that we don't keep the
499         SpaceSplitString when moving between quirks and non-quirks mode documents.
500
501         * dom/Element.cpp:
502         (WebCore::Element::classAttributeChanged):
503         (WebCore::Element::insertedInto):
504         * dom/Element.h:
505         (Element):
506         * dom/ElementRareData.h:
507         (WebCore::ElementRareData::clearClassListValueForQuirksMode):
508         * html/ClassList.cpp:
509         * html/ClassList.h:
510         (WebCore::ClassList::clearValueForQuirksMode):
511
512 2013-01-02  Adam Barth  <abarth@webkit.org>
513
514         [V8] V8DOMWrapper.cpp has many more includes than necessary
515         https://bugs.webkit.org/show_bug.cgi?id=105968
516
517         Reviewed by Kentaro Hara.
518
519         Now that this file isn't in charge of doing everything under the sun,
520         it can have a more focused set of include directives.
521
522         * bindings/v8/V8DOMWrapper.cpp:
523
524 2013-01-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
525
526         [EFL][CMAKE] Remove duplicated conditionals
527         https://bugs.webkit.org/show_bug.cgi?id=105905
528
529         Reviewed by Laszlo Gombos.
530
531         Remove conditionals from CMake build system, where the files being built are already wrapped with
532         the conditionals. It just messes cmake file up.
533
534         * PlatformEfl.cmake:
535
536 2013-01-02  Alexey Proskuryakov  <ap@apple.com>
537
538         Release build fix.
539
540         * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::formFinalize):
541         Use ASSERT_UNUSED for an otherwise unused variable.
542
543 2013-01-02  Tony Chang  <tony@chromium.org>
544
545         Unreviewed, rolling out r138661.
546         http://trac.webkit.org/changeset/138661
547         https://bugs.webkit.org/show_bug.cgi?id=104740
548
549         Compile problems on EFL
550
551         * CMakeLists.txt:
552         * DerivedSources.make:
553         * DerivedSources.pri:
554         * GNUmakefile.am:
555         * UseJSC.cmake:
556         * UseV8.cmake:
557         * WebCore.gyp/WebCore.gyp:
558         * WebCore.gypi:
559         * WebCore.vcproj/WebCoreTestSupport.vcproj:
560         * WebCore.xcodeproj/project.pbxproj:
561         * bindings/scripts/CodeGenerator.pm:
562         (IDLFileForInterface):
563         * page/make_settings.pl:
564         (generateCode):
565         (generateHeader):
566         (printGetterAndSetter):
567         (printInitializer):
568         * testing/InternalSettings.cpp:
569         (WebCore::InternalSettings::Backup::Backup):
570         (WebCore::InternalSettings::Backup::restoreTo):
571         (WebCore::InternalSettings::from):
572         (WebCore::InternalSettings::InternalSettings):
573         (WebCore::InternalSettings::reset):
574         (WebCore::InternalSettings::setPasswordEchoEnabled):
575         (WebCore):
576         (WebCore::InternalSettings::setPasswordEchoDurationInSeconds):
577         * testing/InternalSettings.h:
578         (Backup):
579         (InternalSettings):
580         * testing/InternalSettings.idl:
581         * testing/js/WebCoreTestSupport.cpp:
582         (WebCoreTestSupport::resetInternalsObject):
583         * testing/v8/WebCoreTestSupport.cpp:
584         (WebCoreTestSupport::resetInternalsObject):
585
586 2013-01-02  Adam Barth  <abarth@webkit.org>
587
588         [V8] There are some extra blank lines after removing INC_STATS
589         https://bugs.webkit.org/show_bug.cgi?id=105964
590
591         Reviewed by Ojan Vafai.
592
593         This patch is a followup to http://trac.webkit.org/changeset/138665
594         that removes some extra blank lines that sed wasn't smart enough to
595         delete for us.
596
597         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
598         (WebCore::V8CSSStyleDeclaration::namedPropertyQuery):
599         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
600         (WebCore::V8DOMFormData::appendCallback):
601         * bindings/v8/custom/V8DOMWindowCustom.cpp:
602         (WebCore::V8DOMWindow::addEventListenerCallback):
603         (WebCore::V8DOMWindow::removeEventListenerCallback):
604         (WebCore::V8DOMWindow::postMessageCallback):
605         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
606         (WebCore::V8DedicatedWorkerContext::postMessageCallback):
607         * bindings/v8/custom/V8DocumentCustom.cpp:
608         (WebCore::V8Document::evaluateCallback):
609         * bindings/v8/custom/V8GeolocationCustom.cpp:
610         (WebCore::V8Geolocation::getCurrentPositionCallback):
611         (WebCore::V8Geolocation::watchPositionCallback):
612         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
613         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
614         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
615         (WebCore::V8HTMLCollection::namedPropertyGetter):
616         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
617         (WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
618         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
619         (WebCore::v8HTMLImageElementConstructorCallback):
620         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
621         (WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
622         * bindings/v8/custom/V8MessagePortCustom.cpp:
623         (WebCore::V8MessagePort::postMessageCallback):
624         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
625         (WebCore::V8NamedNodeMap::namedPropertyGetter):
626         * bindings/v8/custom/V8NotificationCustom.cpp:
627         (WebCore::V8Notification::requestPermissionCallback):
628         * bindings/v8/custom/V8PopStateEventCustom.cpp:
629         (WebCore::V8PopStateEvent::stateAccessorGetter):
630         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
631         (WebCore::V8SQLResultSetRowList::itemCallback):
632         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
633         (WebCore::V8SQLTransaction::executeSqlCallback):
634         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
635         (WebCore::V8SQLTransactionSync::executeSqlCallback):
636         * bindings/v8/custom/V8StorageCustom.cpp:
637         (WebCore::V8Storage::namedPropertyQuery):
638         * bindings/v8/custom/V8StyleSheetListCustom.cpp:
639         (WebCore::V8StyleSheetList::namedPropertyGetter):
640         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
641         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
642         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
643         (WebCore::V8WebGLRenderingContext::getParameterCallback):
644         (WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
645         (WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
646         (WebCore::V8WebGLRenderingContext::getUniformCallback):
647         * bindings/v8/custom/V8WorkerCustom.cpp:
648         (WebCore::V8Worker::postMessageCallback):
649
650 2013-01-02  Alexey Proskuryakov  <ap@apple.com>
651
652         [WK2 NetworkProcess] Uploading fails if a client modified the request
653         https://bugs.webkit.org/show_bug.cgi?id=105965
654
655         Reviewed by Brady Eidson.
656
657         Associating streams with additional information via a side HashMap does not work,
658         because the stream we can see is an internal one, with address and other information
659         not matching a stream that we created.
660
661         It's surprising that this design issue was not causing major trouble without NetworkProcess.
662
663         * platform/network/cf/FormDataStreamCFNet.cpp:
664         (WebCore): Renamed FormContext to FormCreationContext, because this type only used
665         for creation. Later, we use FormStreamFields as context.
666         (WebCore::closeCurrentStream): Moved a star.
667         (WebCore::formCreate): We no longer have a side map to keep updated.
668         (WebCore::formFinalize): Ditto.
669         (WebCore::formCopyProperty): Added an accessor to get FormData pointer from a stream.
670         (WebCore::setHTTPBody): Ditto.
671         (WebCore::httpBodyFromStream): Use the new property to get FormData pointer.
672
673 2013-01-02  Elliott Sprehn  <esprehn@chromium.org>
674
675         Clean up dispatchEvent overrides and overloads
676         https://bugs.webkit.org/show_bug.cgi?id=105959
677
678         Reviewed by Adam Barth.
679
680         Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
681         reimplementing EventTarget::dispatchEvent in subclasses where having the
682         virtual override of dispatchEvent hides the overloads in
683         the superclass.
684
685         No new tests, just refactoring.
686
687         * Modules/indexeddb/IDBDatabase.h:
688         (IDBDatabase):
689         * Modules/indexeddb/IDBOpenDBRequest.h:
690         (IDBOpenDBRequest):
691         * Modules/indexeddb/IDBRequest.h:
692         (IDBRequest):
693         * Modules/indexeddb/IDBTransaction.h:
694         (IDBTransaction):
695         * dom/EventDispatchMediator.h:
696         (FocusEventDispatchMediator):
697         (BlurEventDispatchMediator):
698         * dom/GestureEvent.h:
699         (GestureEventDispatchMediator):
700         * dom/KeyboardEvent.h:
701         (KeyboardEventDispatchMediator):
702         * dom/MouseEvent.h:
703         * dom/Node.h:
704         (Node):
705         * dom/UIEvent.h:
706         (FocusInEventDispatchMediator):
707         (FocusOutEventDispatchMediator):
708         * dom/WheelEvent.h:
709         (WheelEventDispatchMediator):
710         * html/HTMLMediaElement.h:
711         * html/track/TextTrackCue.cpp:
712         * html/track/TextTrackCue.h:
713         (TextTrackCue):
714         * page/DOMWindow.h:
715         (DOMWindow):
716         * svg/SVGElementInstance.h:
717         (SVGElementInstance):
718
719 2013-01-02  David Grogan  <dgrogan@chromium.org>
720
721         IndexedDB: Surface a few more leveldb errors.
722         https://bugs.webkit.org/show_bug.cgi?id=105670
723
724         Reviewed by Tony Chang.
725
726         Two calls to old LevelDBTransaction::get slipped through the cracks.
727
728         * Modules/indexeddb/IDBBackingStore.cpp:
729         (WebCore::IndexKeyCursorImpl::loadCurrentRow):
730         (WebCore::IndexCursorImpl::loadCurrentRow):
731           Make these two functions use safeGet instead of get.
732
733         * platform/leveldb/LevelDBTransaction.cpp:
734         * platform/leveldb/LevelDBTransaction.h:
735           Remove get now that it is unused.
736
737 2013-01-02  Bem Jones-Bey  <bjonesbe@adobe.com>
738
739         When a block's height is determined by min-height/max-height, children with percentage heights are sized incorrectly
740         https://bugs.webkit.org/show_bug.cgi?id=26559
741
742         Reviewed by Tony Chang.
743
744         Percentage logical height computation now takes into account the min and max height of the container.
745
746         Test: fast/block/min-max-height-percent-height-child.html
747
748         * rendering/RenderBox.cpp:
749         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax): Added. Like constrainLogicalHeightByMinMax,
750             but constrains the content box instead of the border box.
751         (WebCore):
752         (WebCore::RenderBox::computeContentLogicalHeight): Make const so it can be called from the const method
753             constrainContentBoxLogicalHeightByMinMax.
754         (WebCore::RenderBox::computePercentageLogicalHeight): Use constrainContentBoxLogicalHeightByMinMax to properly
755             respect min and max height on the containing box when computing the percentage height.
756         * rendering/RenderBox.h:
757         (RenderBox):
758
759 2013-01-02  Tony Chang  <tony@chromium.org>
760
761         Unreviewed, force InternalSettings.cpp to rebuild to try and fix the Apple Win build.
762
763         * testing/InternalSettings.cpp:
764
765 2013-01-02  Alec Flett  <alecflett@chromium.org>
766
767         IndexedDB: Use non-const buffers in put() to avoid copies
768         https://bugs.webkit.org/show_bug.cgi?id=105572
769
770         Reviewed by Adam Barth.
771
772         Change the new put() method to allow the implementation to consume
773         or adopt the vector, to avoid copying.
774
775         No new tests as this is an interface change that will be implemented later.
776
777         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
778         (WebCore::IDBDatabaseBackendImpl::put):
779         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
780         (IDBDatabaseBackendImpl):
781         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
782
783 2013-01-02  Adam Barth  <abarth@webkit.org>
784
785         [V8] Remove INC_STATS because it is unused
786         https://bugs.webkit.org/show_bug.cgi?id=105957
787
788         Reviewed by Ojan Vafai.
789
790         We haven't been able to compile with INC_STATS turned on in a long
791         time. This patch just removes this ancient cruft. I generated this
792         patch using
793
794         find . -type f | xargs sed -i '/INC_STATS/d'
795
796         and then fixing up V8BindingMacros.h.
797
798 2013-01-02  Tony Chang  <tony@chromium.org>
799
800         Generate internal.settings from Settings.in
801         https://bugs.webkit.org/show_bug.cgi?id=104740
802
803         Reviewed by Adam Barth.
804
805         If the setting is declared in Settings.in and is a basic type, generate a
806         setter function at internals.settings.
807
808         InternalSettingsGenerated.idl is created by make_settings.pl. InternalSettings.idl
809         inherits from InternalSettingsGenerated.idl so we can override generated functions if
810         needed or add additional custom setters.
811
812         This patch removes 2 password echo methods from InternalSettings.idl since they are
813         auto generated. There are other methods we could remove, but I'll do that in a followup.
814
815         No new tests, existing tests should pass. Specifically, editing/input/password* tests should pass.
816
817         * CMakeLists.txt: Add generated cpp file to the testing lib.
818         * DerivedSources.make: Add generated idl file and specify all the outputs of make_settings.pl
819         * DerivedSources.pri: Generate idl file before generating bindings and include generated idl
820         for bindings generation.
821         * GNUmakefile.am: Specify all the generated files of make_settings.pl. Add generated idl to
822         list of files to be processed and resulting output to be compiled.
823         * UseJSC.cmake: Add generated idl file to list of idl files to process.
824         * UseV8.cmake: Same as UseJSC.cmake.
825         * WebCore.gyp/WebCore.gyp: Run make_settings.pl earlier so we can run the output through the
826         bindings generator.
827         * WebCore.gypi: Add new files.
828         * WebCore.vcproj/WebCoreTestSupport.vcproj: Add new files.
829         * WebCore.xcodeproj/project.pbxproj: Add new files.
830         * bindings/scripts/CodeGenerator.pm:
831         (IDLFileForInterface): Add current directory to the include path so DerivedSources.make can
832         find the generated idl file.
833         * page/make_settings.pl:
834         (generateCode): Generate InternalSettingsGenerated.{idl,h,cpp}.
835         (generateSettingsMacrosHeader): Rename since we're generating 2 headers now.
836         (setterFunctionName): Helper function for naming a setter.
837         (printGetterAndSetter): Use setterFunctionName.
838         (enumerateParsedItems): Helper function that visits each parsed item.
839         (generateInternalSettingsIdlFile): Generate idl file.
840         (generateInternalSettingsHeaderFile): Generate header file.
841         (generateInternalSettingsCppFile): Generate C++ file.
842         * testing/InternalSettings.cpp:
843         (WebCore::InternalSettings::Backup::Backup): Remove password echo members.
844         (WebCore::InternalSettings::Backup::restoreTo): Remove password echo members.
845         (InternalSettingsWrapper): We can't use RefCountedSupplemental because we're we're already
846         RefCounted. Create a wrapper class to wrap the RefCounted InternalSettings for Supplement<>::provideTo,
847         which uses an OwnPtr.
848         (WebCore::InternalSettingsWrapper::InternalSettingsWrapper): Wraps an InternalSettings that the Page can own.
849         (WebCore::InternalSettingsWrapper::~InternalSettingsWrapper): Clear's m_page when the Page goes away.
850         (WebCore::InternalSettingsWrapper::internalSettings): Unwrap InternalSettings.
851         (WebCore::InternalSettings::from): Update to use InternalSettingsWrapper.
852         (WebCore::InternalSettings::InternalSettings): Call base class constructor.
853         (WebCore::InternalSettings::resetToConsistentState): Renamed from reset() and pass through to base class.
854         Also remove unnecessary pageScaleFactor reset (done in Internals::resetToConsistentState).
855         * testing/InternalSettings.h:
856         (Backup): Remove password echo members.
857         (WebCore::InternalSettings::create): Create an instance instead of using new.
858         (WebCore::InternalSettings::hostDestroyed): Clear the page. This is similar to the code that
859         RefCountedSupplemental has.
860         * testing/InternalSettings.idl: Extends InternalSettingsGenerated.
861         * testing/js/WebCoreTestSupport.cpp:
862         (WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
863         * testing/v8/WebCoreTestSupport.cpp:
864         (WebCoreTestSupport::resetInternalsObject): Rename to resetToConsistentState to be like other code.
865         Remove an unused header.
866
867 2013-01-02  Adam Barth  <abarth@webkit.org>
868
869         HTML preload scanner doesn't need to remember whether we're scanning the body
870         https://bugs.webkit.org/show_bug.cgi?id=105945
871
872         Reviewed by Eric Seidel.
873
874         As far as I can tell, no one uses this state.
875
876         * html/parser/CSSPreloadScanner.cpp:
877         (WebCore::CSSPreloadScanner::CSSPreloadScanner):
878         (WebCore::CSSPreloadScanner::scan):
879         (WebCore::CSSPreloadScanner::emitRule):
880         * html/parser/CSSPreloadScanner.h:
881         (CSSPreloadScanner):
882         * html/parser/HTMLPreloadScanner.cpp:
883         (WebCore::PreloadTask::preload):
884         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
885         (WebCore::HTMLPreloadScanner::processToken):
886         * html/parser/HTMLPreloadScanner.h:
887         (HTMLPreloadScanner):
888         * loader/cache/CachedResourceLoader.cpp:
889         (WebCore::CachedResourceLoader::preload):
890         * loader/cache/CachedResourceLoader.h:
891         (CachedResourceLoader):
892
893 2013-01-02  Abhishek Arya  <inferno@chromium.org>
894
895         Crash in WebCore::Element::cloneElementWithoutChildren.
896         https://bugs.webkit.org/show_bug.cgi?id=105949
897
898         Reviewed by Ryosuke Niwa.
899         
900         RefPtr |ancestors| vector since its elements can be destroyed from mutation events
901         fired in CompositeEditCommand::appendNode. 
902
903         No new tests. The testcase relies on recursive DOM mutations and does not minimize.
904
905         * editing/InsertParagraphSeparatorCommand.cpp:
906         (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock):
907         (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock):
908         (WebCore::InsertParagraphSeparatorCommand::doApply):
909         * editing/InsertParagraphSeparatorCommand.h:
910         (InsertParagraphSeparatorCommand):
911
912 2013-01-02  Douglas Stockwell  <dstockwell@chromium.org>
913
914         Crash in WebCore::InlineBox::deleteLine
915         https://bugs.webkit.org/show_bug.cgi?id=93448
916
917         Reviewed by Eric Seidel.
918
919         When we ran off the end of the line while looking for line breaks in an
920         inline with white-space:nowrap nested in a block with white-space:pre
921         it was possible for the line break to be set at or before the current
922         position -- this could result in duplications in the render tree or
923         infinite looping.
924
925         This patch changes the "fixup" logic that runs after we have finished
926         iterating through elements and text and have potentially found a break
927         point. In the case of a block setting white-space:pre we would back up
928         a character in some cases. Not doing so could leave whitespace that
929         should have been collapsed at the end of an inline.
930
931         For example in '<span style="white-space:nowrap">x_</span>_y' if a
932         break was inserted before 'y' the space after 'x' would still be
933         rendered (rather than be collapsed with the break).
934
935         To avoid this problem we will not take the opportunity to break until
936         we have finished collapsing whitespace.
937
938         Tests: fast/text/whitespace/inline-whitespace-wrapping-1.html
939                fast/text/whitespace/inline-whitespace-wrapping-2.html
940                fast/text/whitespace/inline-whitespace-wrapping-3.html
941                fast/text/whitespace/inline-whitespace-wrapping-4.html
942                fast/text/whitespace/nowrap-white-space-collapse.html
943                fast/text/whitespace/pre-block-normal-inline-crash-1.html
944                fast/text/whitespace/pre-block-normal-inline-crash-2.html
945
946         * rendering/RenderBlockLineLayout.cpp:
947         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Collapse
948         whitespace before breaking. Avoid setting the break before the current
949         position.
950
951 2013-01-02  Adam Barth  <abarth@webkit.org>
952
953         Remove webkitPostMessage
954         https://bugs.webkit.org/show_bug.cgi?id=105910
955
956         Reviewed by Kentaro Hara.
957
958         The vendor-prefixed version of postMessage was never widely used.
959         We've been compiling it out of the Chromium port for a while now and
960         haven't received any reports of compatibility problems. I've done a
961         number of web searches for uses of the API and personally contacted a
962         handful of authors I found using the API, all of whom have now moved to
963         the identical unprefixed API. We've publicied the prefix removal in a
964         blog post:
965
966         http://blog.chromium.org/2012/11/a-web-developers-guide-to-latest-chrome.html
967
968         and discussed it on webkit-dev:
969
970         http://lists.macosforge.org/pipermail/webkit-dev/2012-September/022189.html
971
972         We've done our diligence, and now we should remove the API from the
973         remainder of the ports.
974
975         * bindings/js/JSDOMWindowCustom.cpp:
976         * bindings/js/JSDedicatedWorkerContextCustom.cpp:
977         * bindings/js/JSMessagePortCustom.cpp:
978         * bindings/js/JSWorkerCustom.cpp:
979         * bindings/v8/custom/V8DOMWindowCustom.cpp:
980         (WebCore::V8DOMWindow::postMessageCallback):
981         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
982         (WebCore::V8DedicatedWorkerContext::postMessageCallback):
983         * bindings/v8/custom/V8MessagePortCustom.cpp:
984         (WebCore::V8MessagePort::postMessageCallback):
985         * bindings/v8/custom/V8WorkerCustom.cpp:
986         (WebCore::V8Worker::postMessageCallback):
987         * dom/MessagePort.idl:
988         * page/DOMWindow.idl:
989         * workers/DedicatedWorkerContext.idl:
990         * workers/Worker.idl:
991
992 2013-01-02  Benjamin Poulain  <benjamin@webkit.org>
993
994         Optimize TransformationMatrix::multiply() for x86_64
995         https://bugs.webkit.org/show_bug.cgi?id=105719
996
997         Reviewed by Sam Weinig.
998
999         On x86_64, we have access to 16 XMM registers. This can hold 32 double values.
1000         We can use that in two ways to optimize matrix multiplications:
1001         -Keep the source matrix completely in registers. Write the result directly in
1002          the source matrix's memory. This avoids the memcpy at the end of the multiplication
1003          and various memory operations.
1004         -Use SIMD with SSE to perform 2 operations at a time.
1005
1006         The parameter from the second matrix are loaded one by one in XMM registers.
1007         Loading them with SSE then shuffling the values perform worse than loading
1008         one by one.
1009
1010         This is only enabled on 64bits as x86 only has access to 8 XMM registers and
1011         the function should be written differently.
1012
1013         On a i5, TransformationMatrix::multiply() perform about 3 times faster with the change.
1014
1015         * platform/graphics/transforms/TransformationMatrix.cpp:
1016         (WebCore::TransformationMatrix::multiply):
1017         * platform/graphics/transforms/TransformationMatrix.h:
1018         (TransformationMatrix): Fix an incorrect comment. Unify the comment with the cpp file.
1019
1020 2013-01-02  Mike West  <mkwst@chromium.org>
1021
1022         Clean up the loadXXXStyle() idiom in StyleResolver.
1023         https://bugs.webkit.org/show_bug.cgi?id=105903
1024
1025         Reviewed by Darin Adler.
1026
1027         This patch refactors 'loadViewSourceStyle' in order to avoid the
1028         necessity of each call site checking whether the relevant data has
1029         been loaded. The new 'viewSourceStyle' will load the data if required,
1030         and return a pointer which can be used directly.
1031
1032         No new tests, as this refactoring should exhibit no visible change in
1033         behavior.
1034
1035         * css/StyleResolver.cpp:
1036         (WebCore::viewSourceStyle):
1037             Lazily populate the static 'defaultViewSourceStyle' with data. I
1038             haven't removed the outer variable, as it's used directly in
1039             StyleResolver::reportMemoryUsage.
1040         (WebCore::StyleResolver::matchUARules):
1041         (WebCore::StyleResolver::collectFeatures):
1042             Use the new hotness rather than the old, lame method.
1043
1044 2013-01-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1045
1046         Unreviewed, rolling out r138627.
1047         http://trac.webkit.org/changeset/138627
1048         https://bugs.webkit.org/show_bug.cgi?id=105935
1049
1050         This patch doesn't fix Windows port build failure (Requested
1051         by rniwa on #webkit).
1052
1053         * WebCore.vcproj/WebCore.vcproj:
1054
1055 2013-01-02  Elliott Sprehn  <esprehn@chromium.org>
1056
1057         Transitions and animations do not apply to CSS ::before and ::after pseudo-elements
1058         https://bugs.webkit.org/show_bug.cgi?id=92591
1059
1060         Reviewed by Eric Seidel.
1061
1062         The new DOM based :before and :after pseudo elements support animations
1063         and transitions already, but I had disabled support so we could turn them
1064         on in a separate step. This patch just removes the checks and adds tests.
1065
1066         This also adds two methods to internals to allow pausing animations and
1067         transitions on pseudo elements at predictable locations so the tests
1068         are not flaky.
1069
1070         Tests: fast/css-generated-content/pseudo-animation.html
1071                fast/css-generated-content/pseudo-transition.html
1072
1073         * WebCore.exp.in:
1074         * page/animation/AnimationController.cpp:
1075         (WebCore::AnimationController::updateAnimations):
1076         * testing/Internals.cpp:
1077         (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement):
1078         (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement):
1079         * testing/Internals.h:
1080         (Internals):
1081         * testing/Internals.idl:
1082
1083 2013-01-02  Chris Rogers  <crogers@google.com>
1084
1085         Implement WebIDL-style string constants in WebAudio
1086         https://bugs.webkit.org/show_bug.cgi?id=105058
1087
1088         Reviewed by Kentaro Hara.
1089
1090         See Deprecation Notes for more detail:
1091         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#DeprecationNotes
1092
1093         PannerNode, BiquadFilterNode, OscillatorNode constants must support WebIDL-style string constants.
1094         Legacy support in the setters for the old integer values should be supported.
1095
1096         This patch handles the changes for OscillatorNode.
1097
1098         * GNUmakefile.list.am:
1099         * Modules/webaudio/OscillatorNode.cpp:
1100         (WebCore::OscillatorNode::OscillatorNode):
1101         (WebCore::OscillatorNode::type):
1102         (WebCore):
1103         (WebCore::OscillatorNode::setType):
1104         * Modules/webaudio/OscillatorNode.h:
1105         * Modules/webaudio/OscillatorNode.idl:
1106         * Target.pri:
1107         * UseJSC.cmake:
1108         * UseV8.cmake:
1109         * WebCore.gypi:
1110         * WebCore.xcodeproj/project.pbxproj:
1111         * bindings/js/JSOscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
1112         (WebCore):
1113         (WebCore::JSOscillatorNode::setType):
1114         * bindings/v8/custom/V8OscillatorNodeCustom.cpp: Copied from Source/WebCore/Modules/webaudio/OscillatorNode.idl.
1115         (WebCore):
1116         (WebCore::V8OscillatorNode::typeAccessorSetter):
1117
1118 2013-01-02  Robert Hogan  <robert@webkit.org>
1119
1120         Regression (r132935): WebKit breaks between <nobr> tags
1121         https://bugs.webkit.org/show_bug.cgi?id=11857
1122
1123         Reviewed by David Hyatt.
1124
1125         The fix for bug 29648 in http://trac.webkit.org/changeset/132935 was too broad - it caused us
1126         to find linebreaks in autowrap containers between non-wrapping elements where there was no 
1127         whitespace to allow the break. This reverts the code change in r132935 and ensures we attempt
1128         to move below floats when inside an autowrap container but leaves the treatment of non-wrapping
1129         elements in an autowrap container unaffected.
1130
1131         Test: fast/inline/break-between-nobr.html
1132
1133         * rendering/RenderBlockLineLayout.cpp:
1134         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
1135
1136 2013-01-02  Ryosuke Niwa  <rniwa@webkit.org>
1137
1138         Another Windows port build fix attempt. Don't try to build WTF files in WebCore.
1139
1140         Rubber-stamped by Sam Weinig.
1141
1142         * WebCore.vcproj/WebCore.vcproj:
1143
1144 2013-01-02  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1145
1146         [EFL] [WebGL] Minor cleanup in PlatformContext.
1147         https://bugs.webkit.org/show_bug.cgi?id=105872
1148
1149         Reviewed by Kenneth Rohde Christiansen.
1150
1151         The logic to check for supported extensions is scattered in different classes i.e PlatformContext, eglcontext etc.
1152         This patch cleans up any duplicate code and adds new api in GLPlatformContext to query for supported GL, EGL and GLX extensions.
1153
1154         * PlatformEfl.cmake:
1155         * platform/graphics/opengl/GLPlatformContext.cpp:
1156         (WebCore):
1157         (WebCore::GLPlatformContext::createContext):
1158         (WebCore::GLPlatformContext::supportsGLExtension):
1159         (WebCore::GLPlatformContext::supportsEGLExtension):
1160         (WebCore::GLPlatformContext::supportsGLXExtension):
1161         (WebCore::GLPlatformContext::makeCurrent):
1162         (WebCore::GLPlatformContext::initializeResetStatusExtension):
1163         * platform/graphics/opengl/GLPlatformContext.h:
1164         * platform/graphics/surfaces/egl/EGLContext.cpp:
1165         (WebCore::isRobustnessExtSupported):
1166         (WebCore::EGLOffScreenContext::initialize):
1167         * platform/graphics/surfaces/glx/GLXContext.cpp:
1168         (WebCore::initializeARBExtensions):
1169         (WebCore::GLXOffScreenContext::initialize):
1170
1171 2013-01-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1172
1173         Unreviewed, rolling out r138601.
1174         http://trac.webkit.org/changeset/138601
1175         https://bugs.webkit.org/show_bug.cgi?id=105917
1176
1177         Also not an optimal solution, needs more discussion.
1178         (Requested by mkwst_ on #webkit).
1179
1180         * dom/Document.cpp:
1181         (WebCore::Document::finishedParsing):
1182
1183 2013-01-02  Sheriff Bot  <webkit.review.bot@gmail.com>
1184
1185         Unreviewed, rolling out r138611.
1186         http://trac.webkit.org/changeset/138611
1187         https://bugs.webkit.org/show_bug.cgi?id=105916
1188
1189         Not an optimal solution, needs more discussion. (Requested by
1190         mkwst_ on #webkit).
1191
1192         * CMakeLists.txt:
1193         * DerivedSources.make:
1194         * DerivedSources.pri:
1195         * GNUmakefile.am:
1196         * WebCore.gyp/WebCore.gyp:
1197         * WebCore.vcproj/WebCore.vcproj:
1198         * css/StyleResolver.cpp:
1199         (WebCore):
1200         (WebCore::StyleResolver::matchUARules):
1201         (WebCore::StyleResolver::collectFeatures):
1202         (WebCore::StyleResolver::reportMemoryUsage):
1203         * css/seamless.css: Removed.
1204
1205 2013-01-02  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1206
1207         [AC] Memory leak in GraphicsSurfacePrivate::findFBConfigWithAlpha()
1208         https://bugs.webkit.org/show_bug.cgi?id=105770
1209
1210         Reviewed by Noam Rosenthal.
1211
1212         Free the memory returned by glXGetVisualFromFBConfig() using
1213         XFree to avoid a memory leak.
1214
1215         No new tests. No change in behavior.
1216
1217         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1218         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
1219
1220 2013-01-02  Mike West  <mkwst@chromium.org>
1221
1222         The 'body' of seamless IFrames should default to 'margin: 0'
1223         https://bugs.webkit.org/show_bug.cgi?id=90834
1224
1225         Reviewed by Eric Seidel.
1226
1227         Documents displayed in seamless iframes should override the 'body'
1228         element's normal 8px default margins with 0px, in order to ensure that
1229         contents are displayed flush with the boundries of the seamless box.[1]
1230
1231         This patch does so by adding a new user agent stylesheet for seamless
1232         documents, and teaching the StyleResolver how and when to apply it.
1233
1234         [1]: http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0039.html
1235
1236         Test: fast/frames/seamless/seamless-body-margin.html
1237
1238         * DerivedSources.make:
1239         * DerivedSources.pri:
1240         * GNUmakefile.am:
1241         * WebCore.gyp/WebCore.gyp:
1242         * WebCore.vcproj/WebCore.vcproj:
1243         * CMakeLists.txt:
1244             Added a new CSS file! Let's tell everyone!
1245         * css/StyleResolver.cpp:
1246         (WebCore):
1247         (WebCore::loadSeamlessStyle):
1248         (WebCore::StyleResolver::matchUARules):
1249         (WebCore::StyleResolver::collectFeatures):
1250         (WebCore::StyleResolver::reportMemoryUsage):
1251             Load the new stylesheet, and apply it to the document in
1252             matchUARules iff the document should be displayed seamlessly.
1253         * css/seamless.css: Added.
1254         (body):
1255             Stylesheet containing defaults for seamless documents.
1256
1257 2013-01-01  Dan Bernstein  <mitz@apple.com>
1258
1259         <rdar://problem/12942239> Update copyright strings
1260
1261         Reviewed by Sam Weinig.
1262
1263         * Info.plist:
1264
1265 2013-01-01  KwangYong Choi  <ky0.choi@samsung.com>
1266
1267         [EFL] Enable MHTML feature
1268         https://bugs.webkit.org/show_bug.cgi?id=105815
1269
1270         Reviewed by Laszlo Gombos.
1271
1272         Add application/x-mimearchive type to archive mime types.
1273         Add mht and mhtml to extension map.
1274
1275         No new tests. Existing layout tests pass.
1276
1277         * loader/archive/ArchiveFactory.cpp:
1278         (WebCore::archiveMIMETypes):
1279         * platform/efl/MIMETypeRegistryEfl.cpp:
1280         (WebCore):
1281
1282 2013-01-01  Mike West  <mkwst@chromium.org>
1283
1284         seamless iframes don't inherit styles when srcdoc is used
1285         https://bugs.webkit.org/show_bug.cgi?id=103539
1286
1287         Reviewed by Eric Seidel.
1288
1289         Seamless iframes populated via a 'srcdoc' attribute should always
1290         inherit styles from their parent documents. At the moment, this is
1291         only the case when they contain a stylesheet or some other markup
1292         that forces a style recalculation on the document. Simple 'srcdoc'
1293         attributes (e.g. "srcdoc='<p>This is a comment.</p>'") bail out of
1294         recalculating style early, resulting in unstyled appearance.
1295
1296         This patch instructs WebCore to treat seamless documents as having an
1297         updated StyleResolver regardless of what actions the parser takes,
1298         which in turn ensures that the document's style is recalculated
1299         correctly.
1300
1301         Test: fast/frames/seamless/seamless-srcdoc.html
1302
1303         * dom/Document.cpp:
1304         (WebCore::Document::finishedParsing):
1305             If it's a seamless document, notify it that its StyleResolver isn't
1306             what it might have expected.
1307
1308 2012-12-31  Jeff Rogers  <jrogers@rim.com>
1309
1310         [BlackBerry] Fullscreen Media Time Indicators Background Incorrect
1311         https://bugs.webkit.org/show_bug.cgi?id=105888
1312
1313         Reviewed by George Staikos.
1314
1315         Internal PR 272699.
1316         Update fullscreen media controls CSS to fix time container background
1317         color. Also fix transparency to be 80% opaque to and the time
1318         remaining text color to match the system player.
1319
1320         No new tests as there is no functionality change.
1321
1322         * css/mediaControlsBlackBerryFullscreen.css:
1323         (video:-webkit-full-screen::-webkit-media-controls-panel):
1324         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
1325         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
1326         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
1327         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
1328         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
1329         (video:-webkit-full-screen::-webkit-media-controls-placeholder):
1330
1331 2012-12-31  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1332
1333         [EFL][WebGL] Add compile time support for GLES2.
1334         https://bugs.webkit.org/show_bug.cgi?id=105816
1335
1336         Reviewed by Kenneth Rohde Christiansen.
1337
1338         This patch adds build support for GLES2.
1339         GLES2 support can be enabled during compile time by passing -DENABLE_GLES2=ON as
1340         cmake config parameter. GLES2 options is not enabled by default. This patch doesn't
1341         address all the build issues related to GLES2 but only adds the needed support in
1342         PlatformEfl.cmake.
1343
1344         * PlatformEfl.cmake:
1345
1346 2012-12-31  Andy Chen  <andchen@rim.com>
1347
1348         [BlackBerry] The HTML5 video fullscreen time indicator on the right cuts clipped when the video is longer than 1 hour
1349         https://bugs.webkit.org/show_bug.cgi?id=105887
1350
1351         Reviewed by George Staikos.
1352
1353         The width of the time part was fixed. Remove it.
1354
1355         No new test is required because no functionality change.
1356
1357         * platform/blackberry/RenderThemeBlackBerry.cpp:
1358         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
1359
1360 2012-12-30  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1361
1362         [EFL] [WebGL] Rename EGLConfigHelper as EGLConfigSelector.
1363         https://bugs.webkit.org/show_bug.cgi?id=105876
1364
1365         Reviewed by Kenneth Rohde Christiansen.
1366
1367         This is to sync the naming conventions of our classes in both EGL and GLX implementations. 
1368         In our GLX implementation, class responsible for the same functionality is named as GLXConfigSelector. 
1369         This patch renames EGLConfigHelper as EGLConfigSelector.
1370
1371         * PlatformEfl.cmake:
1372         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.cpp.
1373         (WebCore):
1374         (WebCore::SharedEGLDisplay::deref):
1375         (WebCore::SharedEGLDisplay::sharedEGLDisplay):
1376         (WebCore::SharedEGLDisplay::SharedEGLDisplay):
1377         (WebCore::SharedEGLDisplay::cleanup):
1378         (WebCore::SharedEGLDisplay::~SharedEGLDisplay):
1379         (WebCore::EGLConfigSelector::EGLConfigSelector):
1380         (WebCore::EGLConfigSelector::~EGLConfigSelector):
1381         (WebCore::EGLConfigSelector::display):
1382         (WebCore::EGLConfigSelector::pBufferContextConfig):
1383         (WebCore::EGLConfigSelector::surfaceContextConfig):
1384         (WebCore::EGLConfigSelector::nativeVisualId):
1385         (WebCore::EGLConfigSelector::reset):
1386         (WebCore::EGLConfigSelector::createConfig):
1387         * platform/graphics/surfaces/egl/EGLConfigSelector.h: Renamed from Source/WebCore/platform/graphics/surfaces/egl/EGLConfigHelper.h.
1388         (WebCore):
1389         (SharedEGLDisplay):
1390         (WebCore::SharedEGLDisplay::create):
1391         (EGLConfigSelector):
1392         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1393         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1394         (WebCore::EGLWindowTransportSurface::configuration):
1395         (WebCore::EGLWindowTransportSurface::destroy):
1396         * platform/graphics/surfaces/egl/EGLSurface.h:
1397         (EGLWindowTransportSurface):
1398
1399 2012-12-30  Philippe Normand  <pnormand@igalia.com>
1400
1401         [GStreamer] webaudio/decode-audio-data-basic.html fails
1402         https://bugs.webkit.org/show_bug.cgi?id=105298
1403
1404         Reviewed by Martin Robinson.
1405
1406         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1407         (WebCore::AudioFileReader::createBus): Return a null pointer if an
1408         error happened while processing a media file.
1409
1410 2012-12-30  Christophe Dumez  <christophe.dumez@intel.com>
1411
1412         Regression(r138545): Makes WebAudio tests crash
1413         https://bugs.webkit.org/show_bug.cgi?id=105869
1414
1415         Reviewed by Philippe Normand.
1416
1417         Stop using smart pointers and adoptGRef() for the
1418         GstBus object and call gst_object_unref() manually.
1419         This fixes assertions hits when calling adoptGRef()
1420         since the GstBus object has a floating reference.
1421
1422         Alternatively, we could keep using smart pointers
1423         and stop calling adoptGRef() so that
1424         gst_object_ref_sink() is called and the floating
1425         flag is cleared but I think it is clearer to do
1426         it manually here.
1427
1428         No new tests, already covered by existing tests.
1429
1430         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1431         (WebCore::messageCallback):
1432         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
1433         (WebCore::AudioDestinationGStreamer::~AudioDestinationGStreamer):
1434         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1435         (WebCore::AudioFileReader::~AudioFileReader):
1436         (WebCore::AudioFileReader::decodeAudioForBusCreation):
1437
1438 2012-12-29  Dimitri Glazkov  <dglazkov@chromium.org>
1439
1440         Rename StyleResolver's member variable that holds SelectorChecker to a proper name.
1441         https://bugs.webkit.org/show_bug.cgi?id=105864
1442
1443         In https://bugs.webkit.org/show_bug.cgi?id=105660#c11, Antti suggested renaming m_checker to
1444         m_selectorChecker. I've forgotten about that, but now I remembered it.
1445
1446         Reviewed by Eric Seidel.
1447
1448         No change in functionality, covered by existing tests.
1449
1450         * css/StyleResolver.cpp/h: Renamed all instances of m_checker to m_selectorChecker.
1451
1452 2012-12-29  Dimitri Glazkov  <dglazkov@chromium.org>
1453
1454         Move pointer to Document up from SelectorChecker to StyleResolver.
1455         https://bugs.webkit.org/show_bug.cgi?id=105863
1456
1457         Now that SelectorChecker is mostly stateless, it no longer needs to keep a pointer to Document, which
1458         makes all the code in StyleResolver that reaches for it sort of weird.
1459
1460         Reviewed by Eric Seidel.
1461
1462         No change in functionality, covered by existing tests.
1463
1464         * css/SelectorChecker.cpp:
1465         (WebCore::SelectorChecker::SelectorChecker): Changed to take document as argument (only used to set bit fields).
1466         (WebCore::SelectorChecker::checkOneSelector): Changed to use element document.
1467         (WebCore::SelectorChecker::checkScrollbarPseudoClass): Ditto.
1468         * css/SelectorChecker.h:
1469         (WebCore): Removed unnecessary Document forward declaration.
1470         (SelectorChecker): Changed constructor declaration, and removed m_document member.
1471         * css/StyleResolver.cpp:
1472         (WebCore::StyleResolver::StyleResolver): Adjusted SelectorChecker initializer accordingly.
1473         (WebCore::StyleResolver::initElement): Changed to use own document accessor.
1474         (WebCore::StyleResolver::initForStyleResolve): Ditto.
1475         (WebCore::StyleResolver::matchUARules): Ditto.
1476         (WebCore::StyleResolver::styleForPage): Ditto.
1477         (WebCore::StyleResolver::applyProperty): Ditto.
1478         (WebCore::StyleResolver::checkForGenericFamilyChange): Ditto.
1479         (WebCore::StyleResolver::initializeFontStyle): Ditto.
1480         (WebCore::StyleResolver::setFontSize): Ditto.
1481         * css/StyleResolver.h:
1482         (WebCore::StyleResolver::document): Changed to use own member.
1483         (WebCore::StyleResolver::documentSettings): Ditto.
1484         (StyleResolver): Added m_document member.
1485         * dom/SelectorQuery.cpp:
1486         (WebCore::SelectorQuery::matches): Changed callsite to reflect new constructor signature.
1487         (WebCore::SelectorQuery::queryAll): Ditto.
1488         (WebCore::SelectorQuery::queryFirst): Ditto.
1489         * html/shadow/ContentSelectorQuery.cpp:
1490         (WebCore::ContentSelectorChecker::ContentSelectorChecker): Ditto.
1491         (WebCore::ContentSelectorQuery::ContentSelectorQuery): Ditto.
1492         * html/shadow/ContentSelectorQuery.h:
1493         (ContentSelectorChecker): Removed unnecessary argument.
1494
1495 2012-12-29  Otto Derek Cheung  <otcheung@rim.com>
1496
1497         [BlackBerry] Cookies with an IP domain are not being loaded properly into memory
1498         https://bugs.webkit.org/show_bug.cgi?id=105859
1499
1500         PR 271597
1501
1502         Reviewed by George Staikos.
1503
1504         The isIP flag isn't persistented in the database. We need to check it
1505         again when we load it into memory.
1506
1507         * platform/blackberry/CookieManager.cpp:
1508         (WebCore::CookieManager::getBackingStoreCookies):
1509
1510 2012-12-29  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1511
1512         [EFL][WebGL] Refactor GLXImplementation.
1513         https://bugs.webkit.org/show_bug.cgi?id=105825
1514
1515         Reviewed by Kenneth Rohde Christiansen.
1516
1517         This patch decouples native window management and logic to find surface configuration in GLX implementation.
1518
1519         * platform/graphics/opengl/GLDefs.h:
1520         * platform/graphics/surfaces/glx/GLXConfigSelector.h: Renamed from Source/WebCore/platform/graphics/surfaces/glx/GLXWindowResources.h.
1521         (WebCore):
1522         (GLXConfigSelector):
1523         (WebCore::GLXConfigSelector::GLXConfigSelector):
1524         (WebCore::GLXConfigSelector::~GLXConfigSelector):
1525         (WebCore::GLXConfigSelector::visualInfo):
1526         (WebCore::GLXConfigSelector::pBufferContextConfig):
1527         (WebCore::GLXConfigSelector::surfaceContextConfig):
1528         (WebCore::GLXConfigSelector::reset):
1529         (WebCore::GLXConfigSelector::createConfig):
1530
1531         Helper class to find surface configuration.
1532
1533         * platform/graphics/surfaces/glx/GLXContext.h:
1534         (GLXOffScreenContext):
1535         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1536         (WebCore::GLXTransportSurface::GLXTransportSurface):
1537         (WebCore::GLXTransportSurface::configuration):
1538         (WebCore::GLXTransportSurface::setGeometry):
1539         (WebCore::GLXTransportSurface::destroy):
1540         (WebCore::GLXPBuffer::GLXPBuffer):
1541         (WebCore::GLXPBuffer::initialize):
1542         (WebCore::GLXPBuffer::configuration):
1543         * platform/graphics/surfaces/glx/GLXSurface.h:
1544         (GLXTransportSurface):
1545         (GLXPBuffer):
1546
1547         Inheritance changed from X11OffScreenWindow to GLPlatformSurface.
1548
1549         * platform/graphics/surfaces/glx/X11WindowResources.cpp:
1550         (WebCore):
1551         (WebCore::X11OffScreenWindow::X11OffScreenWindow):
1552         (WebCore::X11OffScreenWindow::reSizeWindow):
1553         (WebCore::X11OffScreenWindow::createOffscreenWindow):
1554         (WebCore::X11OffScreenWindow::destroyWindow):
1555         (WebCore::X11OffScreenWindow::nativeSharedDisplay):
1556         (WebCore::X11OffScreenWindow::setVisualInfo):
1557         (WebCore::X11OffScreenWindow::isXRenderExtensionSupported):
1558         * platform/graphics/surfaces/glx/X11WindowResources.h:
1559         (WebCore::SharedX11Resources::create):
1560         (SharedX11Resources):
1561         (X11OffScreenWindow):
1562
1563          Removed code related to surface configiration.
1564
1565 2012-12-29  Eugene Klyuchnikov  <eustas@chromium.org>
1566
1567         Web Inspector: [Timeline] cpu bar popover shows wrong duration / cpu time.
1568         https://bugs.webkit.org/show_bug.cgi?id=105854
1569
1570         Reviewed by Vsevolod Vlasov.
1571
1572         Problem: CPU task indexes are already incremented before written to
1573         data structure.
1574
1575         * inspector/front-end/TimelinePanel.js:
1576         (WebInspector.TimelinePanel.prototype._refreshMainThreadBars):
1577         Use for loop to get correct indexes.
1578
1579 2012-12-28  Ilya Tikhonovsky  <loislo@chromium.org>
1580
1581         Web Inspector: Native Memory Instrumentation: instrument not instrumented members.
1582         https://bugs.webkit.org/show_bug.cgi?id=105830
1583
1584         Reviewed by Vsevolod Vlasov.
1585
1586         In some cases we don't want to visit some class members.
1587         As example we decided to skip pointers to interface classes such as GraphicLayerClient.
1588         We could use addWeakPointer for them but it can't be used for nonpointer members.
1589         In the offline discussion we came to a conclusion that we need a new instrumentation
1590         method ignoreMember, which will be used for all the members which we won't like to visit/instrument.
1591
1592         DriveBy: Also I instrumented not yet instrumented members.
1593
1594         * bindings/v8/DOMWrapperMap.h:
1595         (WebCore::DOMWrapperMap::reportMemoryUsage):
1596         * bindings/v8/ScriptWrappable.h:
1597         (WebCore::ScriptWrappable::reportMemoryUsage):
1598         * html/HTMLMediaElement.cpp:
1599         (WebCore::HTMLMediaElement::reportMemoryUsage):
1600         * platform/KURLGoogle.cpp:
1601         (WebCore::KURLGooglePrivate::reportMemoryUsage):
1602         * platform/SharedBuffer.cpp:
1603         (WebCore::SharedBuffer::reportMemoryUsage):
1604         * platform/audio/AudioArray.h:
1605         (WebCore::AudioArray::reportMemoryUsage):
1606         * platform/graphics/GraphicsLayer.cpp:
1607         (WebCore::GraphicsLayer::reportMemoryUsage):
1608         * rendering/RenderLayerCompositor.cpp:
1609         (WebCore::RenderLayerCompositor::reportMemoryUsage):
1610         * rendering/RenderTableSection.cpp:
1611         (WebCore::RenderTableSection::RowStruct::reportMemoryUsage):
1612         * rendering/style/RenderStyle.cpp:
1613         (WebCore::RenderStyle::reportMemoryUsage):
1614         * rendering/style/StyleRareInheritedData.cpp:
1615         (WebCore::StyleRareInheritedData::reportMemoryUsage):
1616
1617 2012-12-29  Andrey Lushnikov  <lushnikov@chromium.com>
1618
1619         Web Inspector: refactor DefaultTextEditor - annotate handlers and fix getters style
1620         https://bugs.webkit.org/show_bug.cgi?id=105829
1621
1622         Reviewed by Pavel Feldman.
1623
1624         Refactor DefaultTextEditor.js: improve handler method annotations,
1625         remove "get" prefix from method names, get rid of unnecessary
1626         delegation (e.g. see _handleCut).
1627
1628         No new tests: no change in behaviour.
1629
1630         * inspector/front-end/DefaultTextEditor.js:
1631         (WebInspector.DefaultTextEditor):
1632         (WebInspector.DefaultTextEditor.prototype._contextMenu):
1633         (WebInspector.DefaultTextEditor.prototype.selection):
1634         (WebInspector.DefaultTextEditor.prototype.lastSelection):
1635         (WebInspector.DefaultTextEditor.prototype.wasShown):
1636         (WebInspector.DefaultTextEditor.prototype.willHide):
1637         (WebInspector.TextEditorChunkedPanel.prototype.createNewChunk):
1638         (WebInspector.TextEditorMainPanel):
1639         (WebInspector.TextEditorMainPanel.prototype.wasShown):
1640         (WebInspector.TextEditorMainPanel.prototype.willHide):
1641         (WebInspector.TextEditorMainPanel.prototype.populateContextMenu):
1642         (WebInspector.TextEditorMainPanel.prototype.splitChunkOnALine):
1643         (WebInspector.TextEditorMainPanel.prototype.expandChunks):
1644         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
1645         (WebInspector.TextEditorMainPanel.prototype.selection):
1646         (WebInspector.TextEditorMainPanel.prototype.lastSelection):
1647         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1648         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
1649         (WebInspector.TextEditorMainPanel.prototype._handleTextInput):
1650         (WebInspector.TextEditorMainPanel.prototype.handleKeyDown):
1651         (WebInspector.TextEditorMainPanel.prototype._handleCut):
1652
1653 2012-12-28  No'am Rosenthal  <noam@webkit.org>
1654
1655         REGRESSION: r138555 asserts on Linux EFL/Qt debug builds
1656         https://bugs.webkit.org/show_bug.cgi?id=105848
1657
1658         Unreviewed test fix.
1659
1660         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1661             Added parameter name to noop shader.
1662
1663 2012-12-28  No'am Rosenthal  <noam@webkit.org>
1664
1665         [Texmap] Use a transform uniform instead of u_flip/u_textureSize
1666         https://bugs.webkit.org/show_bug.cgi?id=105809
1667
1668         Reviewed by Martin Robinson.
1669
1670         In order to support tiled-patterns, we'd have to apply texture-space transformations in the
1671         vertex shader. 
1672         This patch cleans up the current texture-space transformations, and uses 
1673         single matrix uniform instead of the current uniforms.
1674
1675         No new tests, refactor only.
1676
1677         * platform/graphics/texmap/TextureMapperGL.cpp:
1678         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1679         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1680         (WebCore):
1681         * platform/graphics/texmap/TextureMapperShaderManager.h:
1682         (TextureMapperShaderProgram):
1683
1684 2012-12-28  No'am Rosenthal  <noam@webkit.org>
1685
1686         [Texmap] Edge antialiasing in TextureMapper could be done with less per-pixel calls
1687         https://bugs.webkit.org/show_bug.cgi?id=105377
1688
1689         Reviewed by Kenneth Rohde Christiansen.
1690
1691         Instead of passing 8 quad edge coefficients as uniforms and analyze the distance in the
1692         fragment shader, we render the antialiased quad as 4 edge triangles, which originate in the
1693         center of the quad. 
1694
1695         The vertex shader expands the quad based on the screen transform, and applies a value to each vertex to be interpolated by the GPU. 
1696
1697         It is very difficult to test performance gain; However, the following is apparent:
1698         - The matrix multiplications and inversions done before in the quad inflation code were
1699           always visible in instruments/valgrind and they are now gone.
1700         - We now perform a single smoothstep() command per pixel instead of 8 clamp(dot()) commands.
1701         - It should now be possible to antialias individual edges.
1702
1703         Covered by existing tests.
1704
1705         * platform/graphics/texmap/TextureMapperGL.cpp:
1706         (WebCore::TextureMapperGLData::getStaticVBO):
1707             Cache the unit-rect and edge-triangle vertex data in a VBO.
1708
1709         (WebCore::TextureMapperGLData::~TextureMapperGLData):
1710             Clear the cached VBOs upon destruction.
1711
1712         (WebCore::TextureMapperGL::drawBorder):
1713         (WebCore::TextureMapperGL::drawTexture):
1714             Removed call to useProgram, since it's already called in drawTexturedQuadWithProgram.
1715
1716         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1717         (WebCore::TextureMapperGL::drawSolidColor):
1718             Use the new signature "draw" instead of "drawQuad".
1719
1720         (WebCore::TextureMapperGL::drawEdgeTriangles):
1721         (WebCore::TextureMapperGL::drawUnitRect):
1722         (WebCore::TextureMapperGL::draw):
1723             Removed DrawQuad, instead draw either a unit rect or edge triangles.
1724
1725         (WebCore::TextureMapperGL::beginClip):
1726             Use the new setMatrix function.
1727
1728         * platform/graphics/texmap/TextureMapperGL.h:
1729             Added a paint flag for antialiasing.
1730
1731         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1732         (WebCore::TextureMapperShaderProgram::setMatrix):
1733             Since we now set the matrix in multiple locations, added a convenience 
1734             function for matrix uniform.
1735
1736         (WebCore::getShaderSpec):
1737             Update the vertex and fragment shader to account for the new antialiasing
1738             mechanism.
1739         * platform/graphics/texmap/TextureMapperShaderManager.h:
1740         (TextureMapperShaderProgram):
1741
1742 2012-12-28  Mark Rowe  <mrowe@apple.com>
1743
1744         Move logic for extracting the OS X marketing version in to WebCore
1745         <http://webkit.org/b/105841> / <rdar://problem/10736041>
1746
1747         Reviewed by Dan Bernstein.
1748
1749         The logic for extracting the OS X markerting version is moved in to systemMarketingVersion
1750         from WebKitSystemInterface (post-10.8) and WebKit (pre-10.8).
1751
1752         * WebCore.exp.in: Export systemMarketingVersion and remove the old WKSI symbol.
1753         * WebCore.xcodeproj/project.pbxproj: Add the new files.
1754         * platform/mac/SystemVersionMac.h: Added.
1755         * platform/mac/SystemVersionMac.mm: Added.
1756         (WebCore::createSystemMarketingVersion): Read the marketing version out of SystemVersion.plist
1757         (WebCore::callGestalt):
1758         (WebCore::createSystemMarketingVersion): Build the marketing version by piecing together the results
1759         of calls to Gestalt.
1760         (WebCore::systemMarketingVersion): Return the cached string.
1761         * platform/mac/WebCoreSystemInterface.h: Remove the old WKSI symbol.
1762         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1763
1764 2012-12-28  Rafael Weinstein  <rafaelw@chromium.org>
1765
1766         [Templates]: Fix assert in colgroup parse handling
1767         https://bugs.webkit.org/show_bug.cgi?id=105837
1768
1769         Reviewed by Eric Seidel.
1770
1771         Tests added to html5lib.
1772
1773         * html/parser/HTMLTreeBuilder.cpp:
1774         (WebCore::HTMLTreeBuilder::processEndTag):
1775
1776 2012-12-28  Philippe Normand  <pnormand@igalia.com>
1777
1778         [GStreamer] GstMessage handler in AudioDestination
1779         https://bugs.webkit.org/show_bug.cgi?id=105292
1780
1781         Reviewed by Martin Robinson.
1782
1783         Handle GStreamer warnings and errors coming from the playback
1784         pipeline. For now we only display warnings on the console.
1785
1786         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1787         (WebCore::messageCallback):
1788         (WebCore):
1789         (WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
1790         (WebCore::AudioDestinationGStreamer::finishBuildingPipelineAfterWavParserPadReady):
1791         (WebCore::AudioDestinationGStreamer::handleMessage):
1792         * platform/audio/gstreamer/AudioDestinationGStreamer.h:
1793         (AudioDestinationGStreamer):
1794
1795 2012-12-28  Martin Robinson  <mrobinson@igalia.com>
1796
1797         [GTK][WK2] Add support for IME Composition
1798         https://bugs.webkit.org/show_bug.cgi?id=65093
1799
1800         Reviewed by Carlos Garcia Campos.
1801
1802         No new tests. The GtkInputMethodFilter is covered by unit tests in TestWebKitAPI.
1803         Doing functional tests for this behavior is much more complex.
1804
1805         * platform/gtk/GtkInputMethodFilter.cpp:
1806         (WebCore::GtkInputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents): Now
1807         pass along whether or not an event was faked.
1808         * platform/gtk/GtkInputMethodFilter.h: Ditto.
1809
1810 2012-12-27  Emil A Eklund  <eae@chromium.org>
1811
1812         REGRESSION (r138196): Regions with text-overflow: ellipsis; are being ellipsized unnecessarily
1813         https://bugs.webkit.org/show_bug.cgi?id=105600
1814
1815         Reviewed by Darin Adler.
1816         
1817         Pixel-snap lineBoxEdge before comparing with the block edge as
1818         the lineBox edge isn't guaranteed to be snapped to device pixels
1819         on all platforms.
1820
1821         Test: fast/sub-pixel/ellipsis-table.html
1822
1823         * rendering/RenderBlockLineLayout.cpp:
1824         (WebCore::RenderBlock::checkLinesForTextOverflow):
1825
1826 2012-12-28  Brandon Jones  <bajones@chromium.org>
1827
1828         [chromium] DrawingBuffer initialization loop breaks if completely out of memory
1829         https://bugs.webkit.org/show_bug.cgi?id=105732
1830
1831         Reviewed by Kenneth Russell.
1832
1833         When DrawingBuffer allocation fails because s_currentResourceUsePixels is maxed out
1834         it now forces WebGLRenderingContext creation to fail gracefully.
1835
1836         * html/canvas/WebGLRenderingContext.cpp:
1837         (WebCore::WebGLRenderingContext::create): On Chromium, check for failure to allocate a DrawingBuffer
1838
1839 2012-12-28  Dan Bernstein  <mitz@apple.com>
1840
1841         Slightly clean up WebCore's Base.xcconfig
1842         https://bugs.webkit.org/show_bug.cgi?id=105808
1843
1844         Reviewed by Sam Weinig.
1845
1846         * Configurations/Base.xcconfig: Simplify the definition of GCC_GENERATE_DEBUGGING_SYMBOLS,
1847         which is always YES.
1848
1849 2012-12-28  Rafael Weinstein  <rafaelw@chromium.org>
1850
1851         Heap-use-after-free in WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement
1852         https://bugs.webkit.org/show_bug.cgi?id=105780
1853
1854         Reviewed by Eric Seidel.
1855
1856         This was regression was created by the HTMLTemplateElement implementation. The issue was a missed instance of
1857         "fragment or template contents" case related to the parsing of colgroups.
1858
1859         * html/parser/HTMLTreeBuilder.cpp:
1860         (WebCore::HTMLTreeBuilder::processColgroupEndTagForInColumnGroup):
1861         (WebCore::HTMLTreeBuilder::processStartTag):
1862         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
1863         (WebCore::HTMLTreeBuilder::processEndOfFile):
1864
1865 2012-12-27  Vsevolod Vlasov  <vsevik@chromium.org>
1866
1867         Web Inspector: Introduce uri as a UISourceCode unique identifier in workspace.
1868         https://bugs.webkit.org/show_bug.cgi?id=105799
1869
1870         Reviewed by Pavel Feldman.
1871
1872         Added uri field to UISourceCode. 
1873         Debugger and LiveEdit uiSourceCodes are now created through WorkspaceProviders (not projects yet though)
1874         which are responsible for unique uri generation. 
1875         Extracted generic content provider based WorkspaceProvider functionality and url-to-uri conversion logic to ContentProviderWorkspaceProvider class.
1876
1877         * inspector/front-end/BreakpointManager.js:
1878         (WebInspector.BreakpointManager.sourceFileId):
1879         * inspector/front-end/CompilerScriptMapping.js:
1880         * inspector/front-end/DebuggerScriptMapping.js:
1881         (WebInspector.DebuggerScriptMapping):
1882         * inspector/front-end/DefaultScriptMapping.js:
1883         (WebInspector.DefaultScriptMapping):
1884         (WebInspector.DefaultScriptMapping.prototype.addScript):
1885         (WebInspector.DebuggerWorkspaceProvider):
1886         (WebInspector.DebuggerWorkspaceProvider.prototype.addDebuggerFile):
1887         * inspector/front-end/LiveEditSupport.js:
1888         (WebInspector.LiveEditSupport):
1889         (WebInspector.LiveEditSupport.prototype.uiSourceCodeForLiveEdit):
1890         (WebInspector.LiveEditWorkspaceProvider):
1891         (WebInspector.LiveEditWorkspaceProvider.prototype.addLiveEditFile):
1892         * inspector/front-end/NetworkUISourceCodeProvider.js:
1893         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
1894         * inspector/front-end/NetworkWorkspaceProvider.js:
1895         (WebInspector.ContentProviderWorkspaceProvider):
1896         (WebInspector.ContentProviderWorkspaceProvider.uriForURL):
1897         (WebInspector.ContentProviderWorkspaceProvider.prototype.addFile):
1898         (WebInspector.ContentProviderWorkspaceProvider.prototype.uniqueURI):
1899         (WebInspector.NetworkWorkspaceProvider):
1900         (WebInspector.NetworkWorkspaceProvider.prototype.addNetworkFile):
1901         * inspector/front-end/SASSSourceMapping.js:
1902         (_bindUISourceCode):
1903         * inspector/front-end/ScriptSnippetModel.js:
1904         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
1905         * inspector/front-end/TabbedEditorContainer.js:
1906         (WebInspector.TabbedEditorContainer):
1907         (WebInspector.TabbedEditorContainer.prototype._scrollChanged):
1908         (WebInspector.TabbedEditorContainer.prototype._selectionChanged):
1909         (WebInspector.TabbedEditorContainer.prototype._editorClosedByUserAction):
1910         (WebInspector.TabbedEditorContainer.prototype._updateHistory.tabIdToURI):
1911         (WebInspector.TabbedEditorContainer.prototype._updateHistory):
1912         (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
1913         (WebInspector.TabbedEditorContainer.prototype.reset):
1914         * inspector/front-end/UISourceCode.js:
1915         (WebInspector.UISourceCode):
1916         (WebInspector.UISourceCode.prototype.uri):
1917         * inspector/front-end/Workspace.js:
1918         (WebInspector.FileDescriptor):
1919         (WebInspector.Project.prototype._fileAdded):
1920         (WebInspector.Project.prototype._fileRemoved):
1921         (WebInspector.Project.prototype.uiSourceCodeForURI):
1922         (WebInspector.Workspace):
1923         (WebInspector.Workspace.prototype.uiSourceCodeForURI):
1924         (WebInspector.Workspace.prototype.addTemporaryUISourceCode):
1925         (WebInspector.Workspace.prototype.removeTemporaryUISourceCode):
1926         (WebInspector.Workspace.prototype.requestFileContent):
1927         (WebInspector.Workspace.prototype.setFileContent):
1928         (WebInspector.Workspace.prototype.searchInFileContent):
1929         (WebInspector.Workspace.prototype.reset):
1930         * inspector/front-end/inspector.js:
1931
1932 2012-12-28  Yury Semikhatsky  <yurys@chromium.org>
1933
1934         Web Inspector: debugger should step into event handler on event dispatch
1935         https://bugs.webkit.org/show_bug.cgi?id=105827
1936
1937         Reviewed by Pavel Feldman.
1938
1939         Added m_pauseInNextEventListener to InspectorDOMDebuggerAgent. The flag is set
1940         to true when "step into" is pressed and reset to false when either JS execution
1941         pauses, the agent gets disabled or JS call stack becomes empty. If the flag is
1942         true and the next JS stetement to be executed belongs to a JS event listener we
1943         will stop in that listener, otherwise we have two options:
1944           1) Control flow directly(without comming through the native bindings) reaches some JS
1945              statement and will pause in the corresponding JS function, in which case the
1946              flag will be reset;
1947           2) JS call stack becomes empty and execution will continue in the native code. We
1948              use didProcessTask to detect such cases and reset the flag to false every time
1949              event queue finishes next task.
1950
1951         Test: inspector/debugger/debugger-step-into-event-listener.html
1952
1953         * inspector/InspectorController.cpp:
1954         (WebCore::InspectorController::InspectorController):
1955         (WebCore::InspectorController::reportMemoryUsage):
1956         (WebCore::InspectorController::didProcessTask):
1957         * inspector/InspectorController.h:
1958         (WebCore):
1959         (InspectorController):
1960         * inspector/InspectorDOMDebuggerAgent.cpp:
1961         (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
1962         (WebCore::InspectorDOMDebuggerAgent::stepInto):
1963         (WebCore):
1964         (WebCore::InspectorDOMDebuggerAgent::didPause):
1965         (WebCore::InspectorDOMDebuggerAgent::cancelStepIntoEventListener):
1966         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1967         (WebCore::InspectorDOMDebuggerAgent::clear):
1968         * inspector/InspectorDOMDebuggerAgent.h:
1969         (InspectorDOMDebuggerAgent):
1970         * inspector/InspectorDebuggerAgent.cpp:
1971         (WebCore::InspectorDebuggerAgent::stepInto):
1972         (WebCore::InspectorDebuggerAgent::didPause):
1973         * inspector/InspectorDebuggerAgent.h:
1974         (Listener):
1975
1976 2012-12-28  Andrey Lushnikov  <lushnikov@chromium.com>
1977
1978         Web Inspector: enable mutation observer in LayoutTests
1979         https://bugs.webkit.org/show_bug.cgi?id=105826
1980
1981         Reviewed by Pavel Feldman.
1982
1983         Enable mutation observer in LayoutTests.
1984
1985         No new tests: no change in behaviour.
1986
1987         * inspector/front-end/DOMExtension.js:
1988
1989 2012-12-28  Philippe Normand  <pnormand@igalia.com>
1990
1991         [GTK] Some GStreamer-related files don't need to be in libWebCoreGTK
1992         https://bugs.webkit.org/show_bug.cgi?id=105807
1993
1994         Reviewed by Martin Robinson.
1995
1996         * GNUmakefile.list.am: Move some modules not using GTK nor Cairo
1997         to libWebCorePlatform.
1998
1999 2012-12-28  Yury Semikhatsky  <yurys@chromium.org>
2000
2001         Web Inspector: rename distanceToWindow to distance
2002         https://bugs.webkit.org/show_bug.cgi?id=105823
2003
2004         Reviewed by Pavel Feldman.
2005
2006         Renamed distanceToWindow to distance. Introduced a method on HeapSnapshot
2007         that allows to check if given node should be displayed to the user as having
2008         distance 1.
2009
2010         * inspector/front-end/HeapSnapshot.js:
2011         (WebInspector.HeapSnapshotEdge.prototype.serialize):
2012         (WebInspector.HeapSnapshotRetainerEdge.prototype.serialize):
2013         (WebInspector.HeapSnapshotNode.prototype.distance):
2014         (WebInspector.HeapSnapshotNode.prototype.serialize):
2015         (WebInspector.HeapSnapshot.prototype._init):
2016         (WebInspector.HeapSnapshot.prototype.dispose):
2017         (WebInspector.HeapSnapshot.prototype.canHaveDistanceOne):
2018         (WebInspector.HeapSnapshot.prototype._calculateDistances):
2019         (WebInspector.HeapSnapshot.prototype._bfs):
2020         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2021         * inspector/front-end/HeapSnapshotDataGrids.js:
2022         (WebInspector.HeapSnapshotRetainmentDataGrid):
2023         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype._sortFields):
2024         (WebInspector.HeapSnapshotConstructorsDataGrid):
2025         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._sortFields):
2026         * inspector/front-end/HeapSnapshotGridNodes.js:
2027         (WebInspector.HeapSnapshotGenericObjectNode):
2028         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2029         (WebInspector.HeapSnapshotObjectNode):
2030         (WebInspector.HeapSnapshotObjectNode.prototype.comparator):
2031         (WebInspector.HeapSnapshotObjectNode.prototype._enhanceData):
2032         (WebInspector.HeapSnapshotInstanceNode.prototype.comparator):
2033         (WebInspector.HeapSnapshotConstructorNode):
2034         (WebInspector.HeapSnapshotConstructorNode.prototype.comparator):
2035         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
2036         * inspector/front-end/JSHeapSnapshot.js:
2037         (WebInspector.JSHeapSnapshot.prototype.canHaveDistanceOne):
2038
2039 2012-12-28  Andrey Lushnikov  <lushnikov@chromium.com>
2040
2041         Web Inspector: refactor DefaultTextEditor's private methods
2042         https://bugs.webkit.org/show_bug.cgi?id=105797
2043
2044         Reviewed by Pavel Feldman.
2045
2046         - Refactor private methods to public if they are called from external classes
2047         - Get rid of external private variable access.
2048
2049         No tests: no change in behaviour.
2050
2051         * inspector/front-end/DefaultTextEditor.js:
2052         (WebInspector.DefaultTextEditor.prototype.freeCachedElements):
2053         (WebInspector.DefaultTextEditor.prototype._handleTextInput):
2054         (WebInspector.DefaultTextEditor.prototype._handleKeyDown):
2055         (WebInspector.DefaultTextEditor.prototype._handleCut):
2056         (WebInspector.DefaultTextEditor.prototype._contextMenu):
2057         (WebInspector.DefaultTextEditor.prototype._handleScrollChanged):
2058         (WebInspector.DefaultTextEditor.prototype.selection):
2059         (WebInspector.DefaultTextEditor.prototype.lastSelection):
2060         (WebInspector.DefaultTextEditor.prototype.setSelection):
2061         (WebInspector.DefaultTextEditor.prototype.wasShown):
2062         (WebInspector.DefaultTextEditor.prototype._handleFocused):
2063         (WebInspector.DefaultTextEditor.prototype.willHide):
2064         (WebInspector.DefaultTextEditor.prototype.highlightExpression):
2065         (WebInspector.DefaultTextEditor.prototype.overrideViewportForTest):
2066         (WebInspector.TextEditorChunkedPanel.prototype.buildChunks):
2067         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
2068         (WebInspector.TextEditorChunkedPanel.prototype.splitChunkOnALine):
2069         (WebInspector.TextEditorChunkedPanel.prototype.createNewChunk):
2070         (WebInspector.TextEditorChunkedPanel.prototype.scroll):
2071         (WebInspector.TextEditorChunkedPanel.prototype._scheduleRepaintAll):
2072         (WebInspector.TextEditorChunkedPanel.prototype.endUpdates):
2073         (WebInspector.TextEditorChunkedPanel.prototype.chunkForLine):
2074         (WebInspector.TextEditorChunkedPanel.prototype.findVisibleChunks):
2075         (WebInspector.TextEditorChunkedPanel.prototype.repaintAll):
2076         (WebInspector.TextEditorChunkedPanel.prototype.scrollTop):
2077         (WebInspector.TextEditorChunkedPanel.prototype.clientHeight):
2078         (WebInspector.TextEditorChunkedPanel.prototype.expandChunks):
2079         (WebInspector.TextEditorChunkedPanel.prototype.totalHeight):
2080         (WebInspector.TextEditorChunkedPanel.prototype.resize):
2081         (WebInspector.TextEditorGutterPanel):
2082         (WebInspector.TextEditorGutterPanel.prototype.freeCachedElements):
2083         (WebInspector.TextEditorGutterPanel.prototype.createNewChunk):
2084         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2085         (WebInspector.TextEditorGutterChunk.prototype.get height):
2086         (WebInspector.TextEditorMainPanel):
2087         (WebInspector.TextEditorMainPanel.prototype.wasShown):
2088         (WebInspector.TextEditorMainPanel.prototype.willHide):
2089         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
2090         (WebInspector.TextEditorMainPanel.prototype.freeCachedElements):
2091         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
2092         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
2093         (WebInspector.TextEditorMainPanel.prototype.splitChunkOnALine):
2094         (WebInspector.TextEditorMainPanel.prototype.buildChunks):
2095         (WebInspector.TextEditorMainPanel.prototype.createNewChunk):
2096         (WebInspector.TextEditorMainPanel.prototype.expandChunks):
2097         (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
2098         (WebInspector.TextEditorMainPanel.prototype._paintLines):
2099         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
2100         (WebInspector.TextEditorMainPanel.prototype.getSelection):
2101         (WebInspector.TextEditorMainPanel.prototype.getLastSelection):
2102         (WebInspector.TextEditorMainPanel.prototype.setLastSelection):
2103         (WebInspector.TextEditorMainPanel.prototype.restoreSelection):
2104         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
2105         (WebInspector.TextEditorMainPanel.prototype.enclosingLineRowOrSelf):
2106         (WebInspector.TextEditorMainPanel.prototype._createLink):
2107         (WebInspector.TextEditorMainPanel.prototype._collectDirtyLines):
2108         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
2109         (WebInspector.TextEditorMainPanel.prototype._guessEditRangeBasedOnSelection):
2110         (WebInspector.TextEditorMainPanel.prototype._removeDecorationsInRange):
2111         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
2112         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
2113         (WebInspector.TextEditorMainPanel.prototype.handleSelectionChange):
2114         (WebInspector.TextEditorMainPanel.prototype.handleTextInput):
2115         (WebInspector.TextEditorMainPanel.prototype.handleKeyDown):
2116         (WebInspector.TextEditorMainPanel.prototype.handleCut):
2117         (WebInspector.TextEditorMainPanel.prototype.overrideViewportForTest):
2118         (WebInspector.TextEditorMainChunk.prototype.get height):
2119
2120 2012-12-28  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2121
2122         [EFL][WebGL] Add GLES2 support in GraphicsContext3DEfl.
2123         https://bugs.webkit.org/show_bug.cgi?id=105805
2124
2125         Reviewed by Kenneth Rohde Christiansen.
2126
2127         This is in preparation for adding GLES2 support.
2128         This patch adds OPENGL_ES_2 checks in GraphicsContext3DEFl.
2129         With this patch, GraphicsContext3DPrivate uses the FramebufferBlit extension supported by Extensions3D.
2130
2131         * platform/graphics/GraphicsContext3D.h:
2132         (GraphicsContext3D):
2133         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2134         (WebCore::GraphicsContext3D::GraphicsContext3D):
2135         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2136         (GraphicsContext3DPrivate::copyToGraphicsSurface):
2137         * platform/graphics/opengl/GLDefs.h:
2138
2139 2012-12-27  Dimitri Glazkov  <dglazkov@chromium.org>
2140
2141         Fix styling/formatting errors, pointed out by Darin Adler while reviewing
2142         https://bugs.webkit.org/show_bug.cgi?id=105752
2143
2144         No functional changes, thus no new tests.
2145
2146         * dom/VisitedLinkState.cpp:
2147         (WebCore::VisitedLinkState::VisitedLinkState): Fixed up constructor syntax.
2148         (WebCore::linkHashForElement): Expanded abbreviation.
2149
2150 2012-12-27  Mike West  <mkwst@chromium.org>
2151
2152         Add context to the console message generated by Document::printNavigationErrorMessage.
2153         https://bugs.webkit.org/show_bug.cgi?id=105774
2154
2155         Reviewed by Darin Adler.
2156
2157         When blocking frame navigations, we should give developers more
2158         contextual detail about why the navigation has been blocked. This patch
2159         adds context specifically for sandboxed frames', and gives a slightly
2160         more detailed generic response for all other blockages.
2161
2162         No new tests; the changes to the error message are covered via
2163         rebaselines to existing navigation tests.
2164
2165         * dom/Document.cpp:
2166         (WebCore::printNavigationErrorMessage):
2167         (WebCore::Document::canNavigate):
2168             Pass in a 'reason' parameter when calling printNavigationErrorMessage
2169             to report a blocked navigation.
2170
2171 2012-12-27  Dimitri Glazkov  <dglazkov@chromium.org>
2172
2173         Move visited link-checking (and caching) code out of SelectorChecker.
2174         https://bugs.webkit.org/show_bug.cgi?id=105752
2175
2176         SelectorChecker knew too much about visited links and how links are stored in DOM. This change
2177         moves the code to more relevant locations and moves the visited links cache all the way up to Document,
2178         introducing VisitedLinkState class to manage the state of visited links.
2179         Relanding without a null-ptr ref.
2180
2181         Reviewed by Antti Koivisto.
2182
2183         No change in behavior, covered by existing tests.
2184
2185         * CMakeLists.txt: Added VisitedLinkState to build system.
2186         * GNUmakefile.list.am: Ditto.
2187         * Target.pri: Ditto.
2188         * WebCore.gypi: Ditto.
2189         * WebCore.xcodeproj/project.pbxproj: Ditto.
2190         * css/SelectorChecker.cpp: Moved visited-link state code out to VisitedLinkState class.
2191         * css/SelectorChecker.h: Ditto.
2192         * css/StyleResolver.cpp:
2193         (WebCore::StyleResolver::initElement): Changed callsite to use VisitedLinkState.
2194         * css/StyleResolver.h: Removed plumb-throughs that are now unnecessary.
2195         * dom/DOMAllInOne.cpp: Added VisitedLinkState to build system.
2196         * dom/Document.cpp: Added VisitedLinkState initalizer.
2197         * dom/Document.h: Added VisitedLinkState member.
2198         * dom/VisitedLinkState.cpp: Added.
2199         * dom/VisitedLinkState.h: Added.
2200         * history/CachedPage.cpp:
2201         (WebCore::CachedPage::restore): Changed callsite to use VisitedLinkState.
2202         * page/Page.cpp:
2203         (WebCore::Page::allVisitedStateChanged): Ditto.
2204         (WebCore::Page::visitedStateChanged): Ditto.
2205
2206 2012-12-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2207
2208         [EFL][WebGL] Implement EGL support with GLX.
2209         https://bugs.webkit.org/show_bug.cgi?id=105602
2210
2211         Reviewed by Kenneth Rohde Christiansen.
2212
2213         This is in preparation for adding GLES2 support.
2214         This patch adds support for EGL with GLX backend. EGL support can be enabled during compile time
2215         by passing -DENABLE_EGL=ON as cmake config parameter. This is disabled by default.
2216
2217         * PlatformEfl.cmake:
2218         * platform/graphics/opengl/GLDefs.h:
2219         (WebCore):
2220         * platform/graphics/opengl/GLPlatformContext.cpp:
2221         (WebCore):
2222         (WebCore::GLPlatformContext::createContext): Added GLX checks.
2223         (WebCore::GLPlatformContext::createOffScreenContext): Added support for creating EGLOffscreen Context.
2224         (WebCore::GLPlatformContext::createCurrentContextWrapper): Added support for creating EGLCurrentContextWrapper.
2225         * platform/graphics/opengl/GLPlatformContext.h:
2226         * platform/graphics/opengl/GLPlatformSurface.cpp:
2227         (WebCore::GLPlatformSurface::createTransportSurface): Added support for creating EGLSurface.
2228
2229         * platform/graphics/surfaces/egl/EGLContext.cpp: Added.
2230         (WebCore):
2231         (WebCore::isRobustnessExtSupported):
2232         (WebCore::EGLCurrentContextWrapper::EGLCurrentContextWrapper):
2233         (WebCore::EGLCurrentContextWrapper::handle):
2234         (WebCore::EGLOffScreenContext::EGLOffScreenContext):
2235         (WebCore::EGLOffScreenContext::initialize):
2236         (WebCore::EGLOffScreenContext::~EGLOffScreenContext):
2237         (WebCore::EGLOffScreenContext::isCurrentContext):
2238         (WebCore::EGLOffScreenContext::platformMakeCurrent):
2239         (WebCore::EGLOffScreenContext::platformReleaseCurrent):
2240         (WebCore::EGLOffScreenContext::freeResources):
2241         (WebCore::EGLOffScreenContext::destroy):
2242         * platform/graphics/surfaces/egl/EGLContext.h:
2243         (WebCore):
2244         (EGLCurrentContextWrapper):
2245         (WebCore::EGLCurrentContextWrapper::~EGLCurrentContextWrapper):
2246         (EGLOffScreenContext):
2247
2248         EGL implementation for Context Management.
2249
2250         * platform/graphics/surfaces/egl/EGLSurface.cpp: Added.
2251         (WebCore):
2252         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
2253         (WebCore::EGLWindowTransportSurface::~EGLWindowTransportSurface):
2254         (WebCore::EGLWindowTransportSurface::configuration):
2255         (WebCore::EGLWindowTransportSurface::swapBuffers):
2256         (WebCore::EGLWindowTransportSurface::destroy):
2257         (WebCore::EGLWindowTransportSurface::freeEGLResources):
2258         * platform/graphics/surfaces/egl/EGLSurface.h:
2259         (WebCore):
2260         (EGLWindowTransportSurface):
2261
2262         EGL implementation for Offscreen Surface. The surface is backed by native window.
2263
2264         * platform/graphics/surfaces/egl/EGLConfigHelper.cpp: Added.
2265         (WebCore):
2266         (WebCore::SharedEGLDisplay::deref):
2267         (WebCore::SharedEGLDisplay::sharedEGLDisplay):
2268         (WebCore::SharedEGLDisplay::SharedEGLDisplay):
2269         (WebCore::SharedEGLDisplay::cleanup):
2270         (WebCore::SharedEGLDisplay::~SharedEGLDisplay):
2271         (WebCore::EGLConfigHelper::EGLConfigHelper):
2272         (WebCore::EGLConfigHelper::~EGLConfigHelper):
2273         (WebCore::EGLConfigHelper::display):
2274         (WebCore::EGLConfigHelper::pBufferContextConfig):
2275         (WebCore::EGLConfigHelper::surfaceContextConfig):
2276         (WebCore::EGLConfigHelper::nativeVisualId):
2277         (WebCore::EGLConfigHelper::reset):
2278         (WebCore::EGLConfigHelper::createConfig):
2279
2280         Helper class to initialize EGL resources and choose right EGL configuration.
2281
2282 2012-12-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2283
2284         Unreviewed, rolling out r138509.
2285         http://trac.webkit.org/changeset/138509
2286         https://bugs.webkit.org/show_bug.cgi?id=105806
2287
2288         Caused several tests to crash (Requested by fsamuel on
2289         #webkit).
2290
2291         * CMakeLists.txt:
2292         * GNUmakefile.list.am:
2293         * Target.pri:
2294         * WebCore.gypi:
2295         * WebCore.xcodeproj/project.pbxproj:
2296         * css/SelectorChecker.cpp:
2297         (WebCore::linkAttribute):
2298         (WebCore):
2299         (WebCore::SelectorChecker::determineLinkStateSlowCase):
2300         (WebCore::SelectorChecker::allVisitedStateChanged):
2301         (WebCore::SelectorChecker::visitedStateChanged):
2302         * css/SelectorChecker.h:
2303         (SelectorChecker):
2304         (WebCore::SelectorChecker::determineLinkState):
2305         (WebCore):
2306         * css/StyleResolver.cpp:
2307         (WebCore::StyleResolver::initElement):
2308         * css/StyleResolver.h:
2309         (WebCore::StyleResolver::allVisitedStateChanged):
2310         (WebCore::StyleResolver::visitedStateChanged):
2311         (StyleResolver):
2312         * dom/DOMAllInOne.cpp:
2313         * dom/Document.cpp:
2314         (WebCore::Document::Document):
2315         * dom/Document.h:
2316         (WebCore):
2317         (Document):
2318         * dom/VisitedLinkState.cpp: Removed.
2319         * dom/VisitedLinkState.h: Removed.
2320         * history/CachedPage.cpp:
2321         (WebCore::CachedPage::restore):
2322         * page/Page.cpp:
2323         (WebCore::Page::allVisitedStateChanged):
2324         (WebCore::Page::visitedStateChanged):
2325
2326 2012-12-27  Dimitri Glazkov  <dglazkov@chromium.org>
2327
2328         Move visited link-checking (and caching) code out of SelectorChecker.
2329         https://bugs.webkit.org/show_bug.cgi?id=105752
2330
2331         SelectorChecker knew too much about visited links and how links are stored in DOM. This change
2332         moves the code to more relevant locations and moves the visited links cache all the way up to Document,
2333         introducing VisitedLinkState class to manage the state of visited links.
2334
2335         Reviewed by Antti Koivisto.
2336
2337         No change in behavior, covered by existing tests.
2338
2339         * CMakeLists.txt: Added VisitedLinkState to build system.
2340         * GNUmakefile.list.am: Ditto.
2341         * Target.pri: Ditto.
2342         * WebCore.gypi: Ditto.
2343         * WebCore.xcodeproj/project.pbxproj: Ditto.
2344         * css/SelectorChecker.cpp: Moved visited-link state code out to VisitedLinkState class.
2345         * css/SelectorChecker.h: Ditto.
2346         * css/StyleResolver.cpp:
2347         (WebCore::StyleResolver::initElement): Changed callsite to use VisitedLinkState.
2348         * css/StyleResolver.h: Removed plumb-throughs that are now unnecessary.
2349         * dom/DOMAllInOne.cpp: Added VisitedLinkState to build system.
2350         * dom/Document.cpp: Added VisitedLinkState initalizer.
2351         * dom/Document.h: Added VisitedLinkState member.
2352         * dom/VisitedLinkState.cpp: Added.
2353         * dom/VisitedLinkState.h: Added.
2354         * history/CachedPage.cpp:
2355         (WebCore::CachedPage::restore): Changed callsite to use VisitedLinkState.
2356         * page/Page.cpp:
2357         (WebCore::Page::allVisitedStateChanged): Ditto.
2358         (WebCore::Page::visitedStateChanged): Ditto.
2359
2360 2012-12-27  Huang Dongsung  <luxtella@company100.net>
2361
2362         [TexMap] Minor refactoring of TextureMapperLayer.
2363         https://bugs.webkit.org/show_bug.cgi?id=105782
2364
2365         Reviewed by Darin Adler.
2366
2367         This patch has two refactorings.
2368         1. Replace TextureMapperPaintOptions from header to implementation file.
2369         2. Add non copyable property to TextureMapperLayer.
2370
2371         No new tests. Refactoring only.
2372
2373         * platform/graphics/texmap/TextureMapperLayer.cpp:
2374         (TextureMapperPaintOptions):
2375         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
2376         (WebCore):
2377         * platform/graphics/texmap/TextureMapperLayer.h:
2378         (WebCore):
2379         (TextureMapperLayer):
2380
2381 2012-12-27  Yury Semikhatsky  <yurys@chromium.org>
2382
2383        Unreviewed. Use real worker in heap profiler instead of the fake one
2384        (was accidentally switched to the fake worker).
2385
2386         * inspector/front-end/HeapSnapshotProxy.js:
2387         (WebInspector.HeapSnapshotWorker):
2388
2389 2012-12-27  Vsevolod Vlasov  <vsevik@chromium.org>
2390
2391         Web Inspector: [Regression] Can not set breakpoints in scripts loaded with source map.
2392         https://bugs.webkit.org/show_bug.cgi?id=105801
2393
2394         Reviewed by Alexander Pavlov.
2395
2396         ResourceScriptMapping now pushes itself to script's source mappings in addScript method.
2397         Binding script to uiSourceCode loaded later is only triggering updateLocations() now.
2398
2399         * inspector/front-end/ResourceScriptMapping.js:
2400         (WebInspector.ResourceScriptMapping.prototype.addScript):
2401         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
2402         * inspector/front-end/Script.js:
2403         (WebInspector.Script.prototype.disableSourceMapping):
2404         (WebInspector.Script.prototype.enableSourceMapping):
2405         (WebInspector.Script.prototype.pushSourceMapping):
2406         (WebInspector.Script.prototype.popSourceMapping):
2407         (WebInspector.Script.prototype.updateLocations):
2408
2409 2012-12-27  Yury Semikhatsky  <yurys@chromium.org>
2410
2411         Web Inspector: remove support for legacy heap graph node format
2412         https://bugs.webkit.org/show_bug.cgi?id=105802
2413
2414         Reviewed by Pavel Feldman.
2415
2416         Removed support for old heap graph node format: we now always store edge count
2417         in each node instead of the first edge index.
2418
2419         * inspector/front-end/HeapSnapshot.js:
2420         (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):
2421
2422 2012-12-27  Yury Semikhatsky  <yurys@chromium.org>
2423
2424         Web Inspector: move js heap snapshot preprocessing to JSHeapSnapshot
2425         https://bugs.webkit.org/show_bug.cgi?id=105798
2426
2427         Reviewed by Pavel Feldman.
2428
2429         HeapSnapshot.js refactorings:
2430         - moved _markInvisibleEdges implementation into JSHeapSnapshot
2431         - moved _calculateFlags implementation into JSHeapSnapshot
2432         - moved _flags array into JSHeapSnapshot
2433         - instead of returning node flags as a field on each node, requesting
2434           snapshot node flag constants from the heap snapshot worker and then
2435           checking for the flags in HeapSnapshotGridNodes now return two optional
2436           boolean fields on each node: canBeQueried and detachedDOMTreeNode
2437         - removed unused propertyAccessor property from serialized heap node
2438         - moved node and edge serialization from providers to the node and edge
2439           classes, js specific fields are serialized only for JSHeapSnapshotNode
2440         - renamed first() to rewind() on providers and iterators
2441
2442         * inspector/front-end/HeapSnapshot.js:
2443         (WebInspector.HeapSnapshotEdge.prototype.serialize):
2444         (WebInspector.HeapSnapshotEdgeIterator.prototype.rewind):
2445         (WebInspector.HeapSnapshotRetainerEdge.prototype.serialize):
2446         (WebInspector.HeapSnapshotRetainerEdgeIterator.prototype.rewind):
2447         (WebInspector.HeapSnapshotNode.prototype.isUserObject):
2448         (WebInspector.HeapSnapshotNode.prototype.serialize):
2449         (WebInspector.HeapSnapshotNodeIterator.prototype.rewind):
2450         (WebInspector.HeapSnapshot.prototype._init):
2451         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2452         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
2453         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
2454         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
2455         (WebInspector.HeapSnapshot.prototype._markInvisibleEdges):
2456         (WebInspector.HeapSnapshot.prototype._calculateFlags):
2457         (WebInspector.HeapSnapshot.prototype.userObjectsMapAndFlag):
2458         (WebInspector.HeapSnapshot.prototype.):
2459         (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass):
2460         (WebInspector.HeapSnapshot.prototype.updateStaticData):
2461         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype._createIterationOrder):
2462         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.rewind):
2463         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.isEmpty):
2464         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeItemsRange):
2465         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
2466         * inspector/front-end/HeapSnapshotGridNodes.js:
2467         (WebInspector.HeapSnapshotGenericObjectNode):
2468         (WebInspector.HeapSnapshotObjectNode):
2469         * inspector/front-end/HeapSnapshotProxy.js:
2470         * inspector/front-end/JSHeapSnapshot.js:
2471         (WebInspector.JSHeapSnapshot):
2472         (WebInspector.JSHeapSnapshot.prototype._markInvisibleEdges):
2473         (WebInspector.JSHeapSnapshot.prototype._calculateFlags):
2474         (WebInspector.JSHeapSnapshot.prototype.userObjectsMapAndFlag):
2475         (WebInspector.JSHeapSnapshot.prototype._flagsOfNode):
2476         (WebInspector.JSHeapSnapshot.prototype._markDetachedDOMTreeNodes):
2477         (WebInspector.JSHeapSnapshot.prototype._markQueriableHeapObjects):
2478         (WebInspector.JSHeapSnapshot.prototype._markPageOwnedNodes):
2479         (WebInspector.JSHeapSnapshotNode.prototype.isUserObject):
2480         (WebInspector.JSHeapSnapshotNode.prototype.serialize):
2481
2482 2012-12-27  Alexander Pavlov  <apavlov@chromium.org>
2483
2484         Web Inspector: Refactor SourceMapParser to enable range-based sourcemap
2485         https://bugs.webkit.org/show_bug.cgi?id=105764
2486
2487         Reviewed by Vsevolod Vlasov.
2488
2489         Test: inspector/styles/range-based-mapping.html
2490
2491         * WebCore.gypi:
2492         * WebCore.vcproj/WebCore.vcproj:
2493         * inspector/compile-front-end.py:
2494         * inspector/front-end/CompilerScriptMapping.js:
2495         (WebInspector.CompilerScriptMapping):
2496         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2497         * inspector/front-end/SourceMap.js: Copied from Source/WebCore/inspector/front-end/CompilerScriptMapping.js.
2498         (WebInspector.SourceMap):
2499           Abstract. Renamed from SourceMapParser and supports only direct (generated -> originating source) mapping via findEntry()
2500         (WebInspector.SourceMap.prototype.sources):
2501         (WebInspector.SourceMap.prototype.sourceContent):
2502         (WebInspector.SourceMap.prototype._parseMappingPayload):
2503         (WebInspector.SourceMap.prototype._parseSections):
2504         (WebInspector.SourceMap.prototype._parseMap):
2505         (WebInspector.SourceMap.prototype._isSeparator):
2506         (WebInspector.SourceMap.prototype._decodeVLQ):
2507         (WebInspector.SourceMap.prototype._canonicalizeURL):
2508         (WebInspector.SourceMap.StringCharIterator):
2509         (WebInspector.SourceMap.StringCharIterator.prototype.next):
2510         (WebInspector.SourceMap.StringCharIterator.prototype.peek):
2511         (WebInspector.SourceMap.StringCharIterator.prototype.hasNext):
2512         (WebInspector.PositionBasedSourceMap):
2513           Extends SourceMap and provides direct (compiled -> original source)
2514           and reverse (original -> compiled source) position mapping via findEntryReversed().
2515         (WebInspector.PositionBasedSourceMap.prototype.findEntry):
2516         (WebInspector.PositionBasedSourceMap.prototype.findEntryReversed):
2517         (WebInspector.PositionBasedSourceMap.prototype._parseMap):
2518         (WebInspector.RangeBasedSourceMap):
2519           Extends SourceMap and provides direct range mapping
2520           (compiled source position -> original source range) via findSourceRange().
2521         (WebInspector.RangeBasedSourceMap.MappingComparator):
2522         (WebInspector.RangeBasedSourceMap.prototype.findSourceRange):
2523         (WebInspector.RangeBasedSourceMap.prototype._rangeForStartIndex):
2524         (WebInspector.SourceRange):
2525         * inspector/front-end/WebKit.qrc:
2526         * inspector/front-end/inspector.html:
2527
2528 2012-12-25  Andrey Adaikin  <aandrey@chromium.org>
2529
2530         Web Inspector: [Canvas] report if there is any uninstrumented canvas on a page
2531         https://bugs.webkit.org/show_bug.cgi?id=105721
2532
2533         Reviewed by Yury Semikhatsky.
2534
2535         Adding a method to the protocol to report if there is any uninstrumented canvas on a page.
2536
2537         Test: inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html
2538
2539         * inspector/InjectedScriptCanvasModuleSource.js:
2540         (.):
2541         * inspector/Inspector.json:
2542         * inspector/InspectorCanvasAgent.cpp:
2543         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2544         (WebCore::InspectorCanvasAgent::enable):
2545         (WebCore::InspectorCanvasAgent::disable):
2546         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
2547         (WebCore):
2548         (WebCore::InspectorCanvasAgent::captureFrame):
2549         (WebCore::InspectorCanvasAgent::startCapturing):
2550         (WebCore::InspectorCanvasAgent::stopCapturing):
2551         (WebCore::InspectorCanvasAgent::getTraceLog):
2552         (WebCore::InspectorCanvasAgent::replayTraceLog):
2553         (WebCore::InspectorCanvasAgent::ensureHasUninstrumentedCanvasesCalculated):
2554         (WebCore::InspectorCanvasAgent::checkIsEnabled):
2555         (WebCore::InspectorCanvasAgent::reset):
2556         * inspector/InspectorCanvasAgent.h:
2557         (WebCore):
2558         (InspectorCanvasAgent):
2559         * inspector/InspectorInstrumentation.cpp:
2560         (WebCore):
2561         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2562
2563 2012-12-27  Vsevolod Vlasov  <vsevik@chromium.org>
2564
2565         Web Inspector: Simplify script mappings by introducing DefaultScriptMapping.
2566         https://bugs.webkit.org/show_bug.cgi?id=103038
2567
2568         Reviewed by Pavel Feldman.
2569
2570         DefaultScriptMapping creates a uiSourceCode for each script and set itself as a mapping for the script.
2571         Script can now have a stack of (possibly disabled) mappings, allowing to try several mappings when calculating uiLocation.
2572         LiveEditSupport object is added on WebInspector to support live editing of readonly DefaultScriptMapping's uiSourceCodes.
2573         DefaultScriptMapping is now the only mapping that creates temporary uiSourceCodes.
2574
2575         * English.lproj/localizedStrings.js:
2576         * WebCore.gypi:
2577         * WebCore.vcproj/WebCore.vcproj:
2578         * inspector/compile-front-end.py:
2579         * inspector/front-end/BreakpointManager.js:
2580         (WebInspector.BreakpointManager):
2581         (WebInspector.BreakpointManager.sourceFileId):
2582         (WebInspector.BreakpointManager.Breakpoint.prototype._breakpointStorageId):
2583         * inspector/front-end/CompilerScriptMapping.js:
2584         (WebInspector.CompilerScriptMapping):
2585         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
2586         (WebInspector.CompilerScriptMapping.prototype.uiLocationToRawLocation):
2587         (WebInspector.CompilerScriptMapping.prototype._reset):
2588         * inspector/front-end/DebuggerModel.js:
2589         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
2590         * inspector/front-end/DebuggerScriptMapping.js:
2591         (WebInspector.DebuggerScriptMapping):
2592         * inspector/front-end/DefaultScriptMapping.js: Added.
2593         * inspector/front-end/LiveEditSupport.js: Added.
2594         * inspector/front-end/ResourceScriptMapping.js:
2595         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
2596         (WebInspector.ResourceScriptMapping.prototype.addScript):
2597         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeAddedToWorkspace):
2598         (WebInspector.ResourceScriptMapping.prototype._hasMergedToVM):
2599         (WebInspector.ResourceScriptMapping.prototype._hasDivergedFromVM):
2600         (WebInspector.ResourceScriptMapping.prototype._workspaceUISourceCodeForScript):
2601         (WebInspector.ResourceScriptMapping.prototype._scriptsForUISourceCode):
2602         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
2603         (WebInspector.ResourceScriptMapping.prototype._reset):
2604         * inspector/front-end/Script.js:
2605         (WebInspector.Script):
2606         (WebInspector.Script.prototype.):
2607         (WebInspector.Script.prototype.editSource):
2608         (WebInspector.Script.prototype.setIsDynamicScript):
2609         (WebInspector.Script.prototype.isDynamicScript):
2610         (WebInspector.Script.prototype.rawLocationToUILocation):
2611         (WebInspector.Script.prototype._enabledSourceMappings):
2612         (WebInspector.Script.prototype._sourceMappingsDiffer):
2613         (WebInspector.Script.prototype.disableSourceMapping):
2614         (WebInspector.Script.prototype.enableSourceMapping):
2615         (WebInspector.Script.prototype.pushSourceMapping):
2616         (WebInspector.Script.prototype.popSourceMapping):
2617         (WebInspector.Script.prototype._updateLocations):
2618         (WebInspector.Script.prototype.createLiveLocation):
2619         * inspector/front-end/ScriptSnippetModel.js:
2620         (WebInspector.ScriptSnippetModel.prototype._projectWillReset):
2621         * inspector/front-end/ScriptsPanel.js:
2622         (WebInspector.ScriptsPanel.prototype._addUISourceCode):
2623         (WebInspector.ScriptsPanel.prototype._uiSourceCodeRemoved):
2624         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
2625         * inspector/front-end/WebKit.qrc:
2626         * inspector/front-end/Workspace.js:
2627         (WebInspector.Workspace.prototype.addTemporaryUISourceCode):
2628         * inspector/front-end/inspector.html:
2629         * inspector/front-end/inspector.js:
2630
2631 2012-12-27  Eugene Klyuchnikov  <eustas@chromium.org>
2632
2633         Web Inspector: console.profileEnd() crashes if called without arguments
2634         https://bugs.webkit.org/show_bug.cgi?id=105759
2635
2636         Reviewed by Vsevolod Vlasov.
2637
2638         Test: inspector/profiler/cpu-profiler-parameterless-profile-end-crash.html
2639
2640         API allows to finish profile without specifying its name.
2641         Profiler tracks profiles stack and finishes outermost profile.
2642         Finished profile title will be used instead of user-specified one.
2643
2644         * bindings/v8/ScriptProfiler.cpp:
2645         (WebCore::ScriptProfiler::stop): Use title provided by profiler.
2646
2647 2012-12-26  No'am Rosenthal  <noam@webkit.org>
2648
2649         [Texmap] Instead of having multiple shaders sources with lots of duplication, we should have one shader source with MACRO variants
2650         https://bugs.webkit.org/show_bug.cgi?id=104815
2651
2652         Reviewed by Kenneth Rohde Christiansen.
2653
2654         Created templates for the vertex and fragment shaders, and added some MACROs in 
2655         TextureMapperShaderManager to allow GLSL precompiler-based configuration.
2656
2657         The template follows a pattern where the main function in the shader calls
2658         applyFooBarIfNeeded(), while applyFooBar() is implemented. The Macros prepended to the template define whether applyIfNeeded resolves to the real function or to a noop.
2659
2660         In addition, made some small changes to the filter shaders so that they can use the same code as the normal shaders.
2661
2662         Covered by existing pixel/ref tests when run on Qt/EFL/GTK.
2663
2664         * platform/graphics/texmap/TextureMapperGL.cpp:
2665         (WebCore::TextureMapperGL::drawTexture):
2666         (WebCore::TextureMapperGL::drawSolidColor):
2667         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
2668         (WebCore::optionsForFilterType):
2669         (WebCore):
2670         (WebCore::getPassesRequiredForFilter):
2671         (WebCore::prepareFilterProgram):
2672         (WebCore::TextureMapperGL::drawFiltered):
2673         (WebCore::BitmapTextureGL::applyFilters):
2674             Always draw using the drawQuad function, and use the new TextureMapperShaderManager::Options mask instead of the old ShaderKey.
2675
2676         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2677         (WebCore):
2678         (WebCore::getShaderSpec):
2679         (WebCore::TextureMapperShaderManager::getShaderProgram):
2680         * platform/graphics/texmap/TextureMapperShaderManager.h:
2681         (TextureMapperShaderProgram):
2682         (TextureMapperShaderManager):
2683
2684 2012-12-26  Huang Dongsung  <luxtella@company100.net>
2685
2686         [TexMap] A Minor optimization of GraphicsLayerTransform.
2687         https://bugs.webkit.org/show_bug.cgi?id=105758
2688
2689         Reviewed by Noam Rosenthal.
2690
2691         Only multiply the transformation matrices if the paramaters are actually
2692         changed.
2693
2694         This optimizes the code path called from flushCompositingStateForThisLayerOnly(),
2695         and potentially setAnimatedTransform().
2696
2697         No new tests. Refactoring only.
2698
2699         * platform/graphics/GraphicsLayerTransform.cpp:
2700         (WebCore::GraphicsLayerTransform::setPosition):
2701         (WebCore::GraphicsLayerTransform::setSize):
2702         (WebCore::GraphicsLayerTransform::setAnchorPoint):
2703         (WebCore::GraphicsLayerTransform::setFlattening):
2704         (WebCore::GraphicsLayerTransform::setLocalTransform):
2705         (WebCore::GraphicsLayerTransform::setChildrenTransform):
2706
2707 2012-12-26  Huang Dongsung  <luxtella@company100.net>
2708
2709         [TexMap] Remove unused members and methods in TextureMapperLayer.
2710         https://bugs.webkit.org/show_bug.cgi?id=105755
2711
2712         Reviewed by Noam Rosenthal.
2713
2714         No new tests. Refactoring only.
2715
2716         * platform/graphics/texmap/TextureMapperLayer.h:
2717         (TextureMapperLayer):
2718         (State):
2719         (WebCore::TextureMapperLayer::State::State):
2720
2721 2012-12-26  Andreas Kling  <akling@apple.com>
2722
2723         [Mac] MemoryPressureHandler: Occasional crashes in uninstall() when responding to memory pressure signal.
2724         <http://webkit.org/b/105772>
2725
2726         Reviewed by Stephanie Lewis.
2727
2728         We can't synchronously dereference _cache_event_source in uninstall() just because m_installed
2729         is true -- the block that initializes _cache_event_source is asynchronous and may not have executed.
2730         Fix this by performing the uninstallation asynchronously on the main queue as well.
2731
2732         * platform/mac/MemoryPressureHandlerMac.mm:
2733         (WebCore::MemoryPressureHandler::uninstall):
2734
2735 2012-12-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2736
2737         Unreviewed, rolling out r137905.
2738         http://trac.webkit.org/changeset/137905
2739         https://bugs.webkit.org/show_bug.cgi?id=105765
2740
2741         Popover does not disappear when hovering another identifier in
2742         sources panel. (Requested by vsevik on #webkit).
2743
2744         * inspector/front-end/Popover.js:
2745         (WebInspector.Popover.prototype._innerShow):
2746         * inspector/front-end/popover.css:
2747         (.popover):
2748
2749 2012-12-26  Eugene Klyuchnikov  <eustas@chromium.org>
2750
2751         Web Inspector: [Resources] Table lose focus (selection) after deleting cookie.
2752         https://bugs.webkit.org/show_bug.cgi?id=105716
2753
2754         Reviewed by Yury Semikhatsky.
2755
2756         This makes deletion of a set of cookies (using keyboard) painful.
2757
2758         * inspector/front-end/CookieItemsView.js: Call method instead of getter.
2759         * inspector/front-end/CookiesTable.js: Remember and use next selected
2760         cookie value.
2761
2762 2012-12-26  Yury Semikhatsky  <yurys@chromium.org>
2763
2764         Web Inspector: extract JS heap profiler specifics into JSHeapSnapshot.js
2765         https://bugs.webkit.org/show_bug.cgi?id=105768
2766
2767         Reviewed by Pavel Feldman.
2768
2769         Inroduced JSHeapSnapshot, JSHeapSnapshotNode, JSHeapSnapshotEdge and JSHeapSnapshotRetainerEdge which
2770         should encapsulate logic specific to JS-heap.
2771         No behavioral changes, covered with existing heap profiler tests.
2772
2773         * WebCore.gypi:
2774         * WebCore.vcproj/WebCore.vcproj:
2775         * inspector/compile-front-end.py:
2776         * inspector/front-end/HeapSnapshot.js:
2777         (WebInspector.HeapSnapshotEdge.prototype.hasStringName):
2778         (WebInspector.HeapSnapshotEdge.prototype.name):
2779         (WebInspector.HeapSnapshotEdge.prototype.node):
2780         (WebInspector.HeapSnapshotEdge.prototype.toString):
2781         (WebInspector.HeapSnapshotRetainerEdge.prototype._node):
2782         (WebInspector.HeapSnapshotRetainerEdge.prototype._edge):
2783         (WebInspector.HeapSnapshotNode.prototype.className):
2784         (WebInspector.HeapSnapshotNode.prototype.classIndex):
2785         (WebInspector.HeapSnapshotNode.prototype.edges):
2786         (WebInspector.HeapSnapshotNode.prototype.id):
2787         (WebInspector.HeapSnapshotNode.prototype.retainers):
2788         (WebInspector.HeapSnapshot.prototype.createNode):
2789         (WebInspector.HeapSnapshot.prototype.createEdge):
2790         (WebInspector.HeapSnapshot.prototype.createRetainingEdge):
2791         (WebInspector.HeapSnapshot.prototype.rootNode):
2792         (WebInspector.HeapSnapshot.prototype.aggregatesForDiff):
2793         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2794         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
2795         (WebInspector.HeapSnapshot.prototype._sortAggregateIndexes):
2796         (WebInspector.HeapSnapshot.prototype._calculateDiffForClass):
2797         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
2798         (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
2799         (WebInspector.HeapSnapshot.prototype.createNodesProviderForDominator):
2800         (WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition):
2801         * inspector/front-end/HeapSnapshotLoader.js:
2802         (WebInspector.HeapSnapshotLoader.prototype.buildSnapshot):
2803         * inspector/front-end/HeapSnapshotProxy.js:
2804         (WebInspector.HeapSnapshotWorker):
2805         * inspector/front-end/HeapSnapshotWorker.js:
2806         * inspector/front-end/JSHeapSnapshot.js: Added.
2807         (WebInspector.JSHeapSnapshot):
2808         (WebInspector.JSHeapSnapshot.prototype.createNode):
2809         (WebInspector.JSHeapSnapshot.prototype.createEdge):
2810         (WebInspector.JSHeapSnapshot.prototype.createRetainingEdge):
2811         (WebInspector.JSHeapSnapshotNode):
2812         (WebInspector.JSHeapSnapshotNode.prototype.canBeQueried):
2813         (WebInspector.JSHeapSnapshotNode.prototype.isPageObject):
2814         (WebInspector.JSHeapSnapshotNode.prototype.distanceToWindow):
2815         (WebInspector.JSHeapSnapshotNode.prototype.className):
2816         (WebInspector.JSHeapSnapshotNode.prototype.classIndex):
2817         (WebInspector.JSHeapSnapshotNode.prototype.id):
2818         (WebInspector.JSHeapSnapshotNode.prototype.isHidden):
2819         (WebInspector.JSHeapSnapshotNode.prototype.isNative):
2820         (WebInspector.JSHeapSnapshotNode.prototype.isSynthetic):
2821         (WebInspector.JSHeapSnapshotNode.prototype.isWindow):
2822         (WebInspector.JSHeapSnapshotNode.prototype.isDetachedDOMTreesRoot):
2823         (WebInspector.JSHeapSnapshotNode.prototype.isDetachedDOMTree):
2824         (WebInspector.JSHeapSnapshotEdge):
2825         (WebInspector.JSHeapSnapshotEdge.prototype.clone):
2826         (WebInspector.JSHeapSnapshotEdge.prototype.hasStringName):
2827         (WebInspector.JSHeapSnapshotEdge.prototype.isElement):
2828         (WebInspector.JSHeapSnapshotEdge.prototype.isHidden):
2829         (WebInspector.JSHeapSnapshotEdge.prototype.isWeak):
2830         (WebInspector.JSHeapSnapshotEdge.prototype.isInternal):
2831         (WebInspector.JSHeapSnapshotEdge.prototype.isInvisible):
2832         (WebInspector.JSHeapSnapshotEdge.prototype.isShortcut):
2833         (WebInspector.JSHeapSnapshotEdge.prototype.name):
2834         (WebInspector.JSHeapSnapshotEdge.prototype.toString):
2835         (WebInspector.JSHeapSnapshotEdge.prototype._hasStringName):
2836         (WebInspector.JSHeapSnapshotEdge.prototype._name):
2837         (WebInspector.JSHeapSnapshotEdge.prototype._nameOrIndex):
2838         (WebInspector.JSHeapSnapshotEdge.prototype._type):
2839         (WebInspector.JSHeapSnapshotRetainerEdge):
2840         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.clone):
2841         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isElement):
2842         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isHidden):
2843         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isInternal):
2844         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isInvisible):
2845         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isShortcut):
2846         (WebInspector.JSHeapSnapshotRetainerEdge.prototype.isWeak):
2847         * inspector/front-end/ProfilesPanel.js:
2848         * inspector/front-end/WebKit.qrc:
2849
2850 2012-12-26  Patrick Gansterer  <paroga@webkit.org>
2851
2852         [WIN] Build fix for !USE(CFNETWORK) after r138413.
2853
2854         * platform/network/NetworkStorageSession.h:
2855         (WebCore):
2856
2857 2012-12-26  Yury Semikhatsky  <yurys@chromium.org>
2858
2859         Web Inspector: prepare HeapSnapshot.js for use with native heap snapshot
2860         https://bugs.webkit.org/show_bug.cgi?id=105763
2861
2862         Reviewed by Alexander Pavlov.
2863
2864         HeapSnapshot.js now expects root node to be either the first or the last (real) one
2865         in the list of all nodes.
2866
2867         * inspector/HeapGraphSerializer.cpp:
2868         (HeapGraphNode):
2869         (WebCore::HeapGraphSerializer::serialize): reordered node and edge fields so that the go in
2870         the same order as in the JS heap snapshot.
2871         * inspector/front-end/HeapSnapshot.js:
2872         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2873         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
2874         * inspector/front-end/NativeHeapGraph.js:
2875         (WebInspector.NativeHeapGraph):
2876         (WebInspector.NativeHeapGraph.prototype.root): now there is explicit root node which is the last
2877         one in the list, use it.
2878         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
2879         (WebInspector.NativeHeapGraph.prototype._addDummyNode): fixed dummy node first edge index.
2880         (WebInspector.NativeHeapGraph.Edge.prototype.target):
2881         (WebInspector.NativeHeapGraph.Node.prototype.referencedNodes):
2882         * inspector/front-end/NativeMemorySnapshotView.js:
2883         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph): switched to use of the root node
2884         (WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):
2885
2886 2012-12-26  Pan Deng  <pan.deng@intel.com>
2887
2888         [Web Inspector]Remove Preview and Response tab from network panel in case websocket.
2889         https://bugs.webkit.org/show_bug.cgi?id=105754
2890
2891         Reviewed by Pavel Feldman.
2892
2893         Network item views for websocket is not consistent before/after receiving a frame.
2894         This change keeps Headers, Frames and Cookies tab for websocket.
2895
2896         No new tests.
2897
2898         * inspector/front-end/NetworkItemView.js:
2899         (WebInspector.NetworkItemView):
2900
2901 2012-12-25  John Griggs  <jgriggs@rim.com>
2902
2903         [BlackBerry] Media controls are drawn on top of one another for media with unknown duration.
2904         https://bugs.webkit.org/show_bug.cgi?id=105747
2905
2906         Reviewed by George Staikos.
2907
2908         No need to reposition controls when there is no timeline element, this mispositions them in the new design.
2909
2910         * platform/blackberry/RenderThemeBlackBerry.cpp:
2911         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
2912
2913 2012-12-25  Alexander Pavlov  <apavlov@chromium.org>
2914
2915         Web Inspector: Crash when modifying a rule that has been removed through JavaScript
2916         https://bugs.webkit.org/show_bug.cgi?id=105718
2917
2918         Reviewed by Yury Semikhatsky.
2919
2920         CSSStyleRules should be stored by RefPtr's to avoid using stale pointers to deleted instances.
2921
2922         Test: inspector/styles/removed-rule-crash.html
2923
2924         * inspector/InspectorStyleSheet.cpp:
2925         (WebCore::InspectorStyleSheet::ruleForId):
2926         (WebCore::InspectorStyleSheet::revalidateStyle):
2927         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
2928         (WebCore::InspectorStyleSheet::collectFlatRules):
2929         * inspector/InspectorStyleSheet.h:
2930         (InspectorStyleSheet):
2931
2932 2012-12-25  Eugene Klyuchnikov  <eustas@chromium.org>
2933
2934         Web Inspector: [Console] Add "Replay XHR" context menu item for corresponding messages.
2935         https://bugs.webkit.org/show_bug.cgi?id=105714
2936
2937         Reviewed by Pavel Feldman.
2938
2939         Expose "request" value from console message object and use it in console
2940         context menu generator.
2941
2942         * inspector/front-end/ConsoleMessage.js: Expose "request".
2943         * inspector/front-end/ConsoleView.js: Add "Replay XHR" menu item.
2944         * inspector/front-end/NetworkPanel.js: Fix whitespaces.
2945
2946 2012-12-25  Alexander Pavlov  <apavlov@chromium.org>
2947
2948         Web Inspector: Make InspectorState instances per-agent, corresponding to JSON map entries in the cookie
2949         https://bugs.webkit.org/show_bug.cgi?id=105722
2950
2951         Reviewed by Yury Semikhatsky.
2952
2953         Inspector state cookie (in JSON format) has become a map (agent name -> "properties object")
2954         to avoid cross-agent property name clashes in a single property namespace.
2955         As such, InspectorState corresponds to a single "properties object" and is now per-agent,
2956         managed by an InspectorCompositeState (which is owned by [Worker]InspectorController).
2957         Since InspectorCompositeState maps "properties objects" by their agent names, InspectorStates are created
2958         by InspectorCompositeState in the InspectorBaseAgentInterface ctor, using the respective agent name.
2959
2960         No new tests, no change in visible behavior.
2961
2962         * inspector/InspectorAgent.cpp: Pass InspectorCompositeState rather than InspectorState.
2963         * inspector/InspectorAgent.h: Ditto.
2964         * inspector/InspectorApplicationCacheAgent.cpp: Ditto.
2965         * inspector/InspectorApplicationCacheAgent.h: Ditto.
2966         * inspector/InspectorBaseAgent.cpp: Ditto.
2967         (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
2968         Create InspectorState via InspectorCompositeState::createAgentState(agentName).
2969         * inspector/InspectorBaseAgent.h: Pass InspectorCompositeState rather than InspectorState.
2970         * inspector/InspectorCSSAgent.cpp: Ditto.
2971         * inspector/InspectorCSSAgent.h: Ditto.
2972         * inspector/InspectorCanvasAgent.cpp: Ditto.
2973         * inspector/InspectorCanvasAgent.h: Ditto.
2974         * inspector/InspectorConsoleAgent.cpp: Ditto.
2975         * inspector/InspectorConsoleAgent.h: Ditto.
2976         * inspector/InspectorController.cpp: Use InspectorCompositeState rather than InspectorState.
2977         * inspector/InspectorController.h: Ditto.
2978         * inspector/InspectorDOMAgent.cpp: Pass InspectorCompositeState rather than InspectorState.
2979         (WebCore::InspectorDOMAgent::InspectorDOMAgent): Ditto.
2980         * inspector/InspectorDOMAgent.h: Ditto.
2981         * inspector/InspectorDOMDebuggerAgent.cpp: Ditto.
2982         * inspector/InspectorDOMDebuggerAgent.h: Ditto.
2983         * inspector/InspectorDOMStorageAgent.cpp: Ditto.
2984         * inspector/InspectorDOMStorageAgent.h: Ditto.
2985         * inspector/InspectorDatabaseAgent.cpp: Ditto.
2986         * inspector/InspectorDatabaseAgent.h: Ditto.
2987         * inspector/InspectorDebuggerAgent.cpp: Ditto.
2988         * inspector/InspectorDebuggerAgent.h: Ditto.
2989         * inspector/InspectorFileSystemAgent.cpp: Ditto.
2990         * inspector/InspectorFileSystemAgent.h: Ditto.
2991         * inspector/InspectorIndexedDBAgent.cpp: Ditto.
2992         * inspector/InspectorIndexedDBAgent.h: Ditto.
2993         * inspector/InspectorInputAgent.cpp: Ditto.
2994         * inspector/InspectorInputAgent.h: Ditto.
2995         * inspector/InspectorLayerTreeAgent.cpp: Ditto.
2996         * inspector/InspectorLayerTreeAgent.h: Ditto.
2997         * inspector/InspectorMemoryAgent.cpp: Ditto.
2998         * inspector/InspectorMemoryAgent.h: Ditto.
2999         * inspector/InspectorPageAgent.cpp: Ditto.
3000         * inspector/InspectorPageAgent.h: Ditto.
3001         * inspector/InspectorProfilerAgent.cpp: Ditto.
3002         * inspector/InspectorProfilerAgent.h: Ditto.
3003         * inspector/InspectorResourceAgent.cpp: Ditto.
3004         * inspector/InspectorResourceAgent.h: Ditto.
3005         * inspector/InspectorRuntimeAgent.cpp: Ditto.
3006         * inspector/InspectorRuntimeAgent.h: Ditto.
3007         * inspector/InspectorState.cpp: Introduce InspectorCompositeState, refactor.
3008         (WebCore::InspectorState::updateCookie): Delegates to the owning InspectorCompositeState instance.
3009         (WebCore::InspectorState::setFromCookie): Gets called from InspectorCompositeState::loadFromCookie().
3010         (WebCore::InspectorState::remove): Don't forget to update the cookie.
3011         (WebCore::InspectorCompositeState::createAgentState): Creates an InspectorState instance for a named agent.
3012         (WebCore::InspectorCompositeState::loadFromCookie): Restores InspectorStates from a cookie.
3013         (WebCore::InspectorCompositeState::inspectorStateUpdated): Delegate invoked from InspectorState::updateCookie().
3014         * inspector/InspectorState.h:
3015         (InspectorStateUpdateListener): InspectorCompositeState API exposed to InspectorState.
3016         * inspector/InspectorTimelineAgent.cpp: Pass InspectorCompositeState rather than InspectorState.
3017         * inspector/InspectorTimelineAgent.h: Ditto.
3018         * inspector/InspectorWorkerAgent.cpp: Ditto.
3019         * inspector/InspectorWorkerAgent.h: Ditto.
3020         * inspector/PageConsoleAgent.cpp: Ditto.
3021         * inspector/PageConsoleAgent.h: Ditto.
3022         * inspector/PageDebuggerAgent.cpp: Ditto.
3023         * inspector/PageDebuggerAgent.h: Ditto.
3024         * inspector/PageRuntimeAgent.cpp: Ditto.
3025         * inspector/PageRuntimeAgent.h: Ditto.
3026         * inspector/WorkerConsoleAgent.cpp: Ditto.
3027         * inspector/WorkerConsoleAgent.h: Ditto.
3028         * inspector/WorkerDebuggerAgent.cpp: Ditto.
3029         * inspector/WorkerDebuggerAgent.h: Ditto.
3030         * inspector/WorkerInspectorController.cpp: Ditto.
3031         * inspector/WorkerInspectorController.h: Ditto.
3032         * inspector/WorkerRuntimeAgent.cpp: Ditto.
3033         * inspector/WorkerRuntimeAgent.h: Ditto.
3034
3035 2012-12-24  Yury Semikhatsky  <yurys@chromium.org>
3036
3037         Memory instrumentation: provide a way to mark a node as a root
3038         https://bugs.webkit.org/show_bug.cgi?id=105737
3039
3040         Reviewed by Alexander Pavlov.
3041
3042         Extended HeapGraphSerializer to add a fake root node with edges to all
3043         real instrumentation roots.
3044
3045         * inspector/HeapGraphSerializer.cpp:
3046         (WebCore::HeapGraphSerializer::reportNode):
3047         (WebCore::HeapGraphSerializer::addRootNode):
3048         (WebCore):
3049         * inspector/HeapGraphSerializer.h:
3050         (HeapGraphSerializer):
3051
3052 2012-12-24  Yury Semikhatsky  <yurys@chromium.org>
3053
3054         Web Inspector: add message listener only in case of standalone test-runner.html
3055         https://bugs.webkit.org/show_bug.cgi?id=105715
3056
3057         Reviewed by Pavel Feldman.
3058
3059         Tell InspectorFrontendAPI that it is launched by standalone test runner so that it
3060         can decide whether message event listener should be added.
3061
3062         * inspector/front-end/InspectorFrontendAPI.js:
3063         * inspector/front-end/test-runner.html:
3064
3065 2012-12-24  Ilya Tikhonovsky  <loislo@chromium.org>
3066
3067         Web Inspector: Native Memory Instrumentation: propagate member type as edge type to the serialized heap graph.
3068         https://bugs.webkit.org/show_bug.cgi?id=105725
3069
3070         Reviewed by Yury Semikhatsky.
3071
3072         MemoryOwningType was renamed to MemberType.
3073         Source argument were removed from reportEdge, reportLeaf and other edge related methods because it is not necessary.
3074         MemberType argument was propagated from MemoryInstrumentation down to HeapGraphSerializer.
3075
3076         * inspector/HeapGraphSerializer.cpp:
3077         (WebCore::HeapGraphEdge::HeapGraphEdge):
3078         (HeapGraphEdge):
3079         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3080         (WebCore::HeapGraphSerializer::reportEdge):
3081         (WebCore::HeapGraphSerializer::reportLeaf):
3082         (WebCore::HeapGraphSerializer::serialize):
3083         * inspector/HeapGraphSerializer.h:
3084         (HeapGraphSerializer):
3085         * inspector/MemoryInstrumentationImpl.cpp:
3086         (WebCore::MemoryInstrumentationClientImpl::reportEdge):
3087         (WebCore::MemoryInstrumentationClientImpl::reportLeaf):
3088         * inspector/MemoryInstrumentationImpl.h:
3089         (MemoryInstrumentationClientImpl):
3090
3091 2012-12-24  Takashi Sakamoto  <tasak@google.com>
3092
3093         ::first-letter { overflow: -webkit-paged-y } causes crash
3094         https://bugs.webkit.org/show_bug.cgi?id=105393
3095
3096         Reviewed by Beth Dakin.
3097
3098         Should check whether e is available or not before invoking
3099         e->hasTagName in adjustRenderStyle in StyleResolver.cpp.
3100
3101         Test: fast/css/pseudo-element-opagedxy-crash.html
3102
3103         * css/StyleResolver.cpp:
3104         (WebCore::StyleResolver::adjustRenderStyle):
3105         If adjustRenderStyle is invoked in pseudoStyleForElement, the given
3106         element is 0. So e is not available. However if the given style's
3107         overflowY is OPAGEDX or OPAGEDY, adjustRenderStyle doesn't check
3108         whether e is available or not before e->hasTagName.
3109         This causes a crash.
3110
3111 2012-12-24  Alexei Filippov  <alph@chromium.org>
3112
3113         Web Inspector: add async API for passing renderer process memory stats
3114         https://bugs.webkit.org/show_bug.cgi?id=105278
3115
3116         Reviewed by Yury Semikhatsky.
3117
3118         On some platforms (e.g. Linux) it may take some time to collect
3119         total process memory information as it involves an IPC out of a
3120         sandboxed renderer process. So add an async way to collect the statistics.
3121
3122         * platform/MemoryUsageSupport.cpp:
3123         (WebCore::MemoryUsageSupport::requestProcessMemorySizes):
3124         (WebCore):
3125         * platform/MemoryUsageSupport.h:
3126         (MemoryUsageSupport):
3127         (ProcessMemorySizesCallback):
3128         (WebCore::MemoryUsageSupport::ProcessMemorySizesCallback::~ProcessMemorySizesCallback):
3129         * platform/chromium/MemoryUsageSupportChromium.cpp:
3130         (WebCore::MemoryUsageSupport::requestProcessMemorySizes):
3131         (WebCore):
3132         * platform/qt/MemoryUsageSupportQt.cpp:
3133         (WebCore::MemoryUsageSupport::requestProcessMemorySizes):
3134         (WebCore):
3135
3136 2012-12-24  Laszlo Gombos  <l.gombos@samsung.com>
3137
3138         Remove wtf/Platform.h includes from {c|cpp} files
3139         https://bugs.webkit.org/show_bug.cgi?id=105678
3140
3141         Reviewed by Kentaro Hara.
3142
3143         Remove wtf/Platform.h from the include list as it is already
3144         included in config.h.
3145
3146         No new tests as there is no new functionality.
3147
3148         * rendering/svg/RenderSVGRect.cpp:
3149
3150 2012-12-24  Kentaro Hara  <haraken@chromium.org>
3151
3152         Follow up fixes for r137739
3153         https://bugs.webkit.org/show_bug.cgi?id=104982
3154
3155         Reviewed by Ryosuke Niwa.
3156
3157         Applied darin's comments in https://bugs.webkit.org/show_bug.cgi?id=104982#c18
3158
3159         No tests. No change in behavior.
3160
3161         * dom/ContainerNode.h:
3162         (WebCore::ChildNodesLazySnapshot::nextNode):
3163
3164 2012-12-24  Tiancheng Jiang  <tijiang@rim.com>
3165
3166         Update BB10 media render theme.
3167         https://bugs.webkit.org/show_bug.cgi?id=105728
3168
3169         Reviewed by Rob Buis.
3170
3171         Internally reviewed by John Griggs.
3172         Use GL renderer to paint media control.
3173
3174         * css/mediaControlsBlackBerry.css:
3175         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
3176         * platform/blackberry/RenderThemeBlackBerry.cpp:
3177         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
3178         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
3179
3180 2012-12-24  Sheriff Bot  <webkit.review.bot@gmail.com>
3181
3182         Unreviewed, rolling out r138436.
3183         http://trac.webkit.org/changeset/138436
3184         https://bugs.webkit.org/show_bug.cgi?id=105723
3185
3186         Asserts on state restoration in debug builds (Requested by
3187         apavlov on #webkit).
3188
3189         * inspector/InspectorAgent.cpp:
3190         (InspectorAgentState):
3191         (WebCore::InspectorAgent::enable):
3192         (WebCore::InspectorAgent::disable):
3193         (WebCore::InspectorAgent::evaluateForTestInFrontend):
3194         (WebCore::InspectorAgent::inspect):
3195         * inspector/InspectorApplicationCacheAgent.cpp:
3196         (ApplicationCacheAgentState):
3197         (WebCore::InspectorApplicationCacheAgent::restore):
3198         (WebCore::InspectorApplicationCacheAgent::enable):
3199         * inspector/InspectorCSSAgent.cpp:
3200         (CSSAgentState):
3201         (WebCore::InspectorCSSAgent::restore):
3202         (WebCore::InspectorCSSAgent::enable):
3203         (WebCore::InspectorCSSAgent::disable):
3204         * inspector/InspectorCanvasAgent.cpp:
3205         (CanvasAgentState):
3206         (WebCore::InspectorCanvasAgent::restore):
3207         (WebCore::InspectorCanvasAgent::enable):
3208         (WebCore::InspectorCanvasAgent::disable):
3209         * inspector/InspectorController.cpp:
3210         (WebCore::InspectorController::InspectorController):
3211         * inspector/InspectorController.h:
3212         (WebCore):
3213         (InspectorController):
3214         * inspector/InspectorDOMStorageAgent.cpp:
3215         (DOMStorageAgentState):
3216         (WebCore::InspectorDOMStorageAgent::restore):
3217         (WebCore::InspectorDOMStorageAgent::enable):
3218         (WebCore::InspectorDOMStorageAgent::disable):
3219         * inspector/InspectorDatabaseAgent.cpp:
3220         (DatabaseAgentState):
3221         (WebCore):
3222         (WebCore::InspectorDatabaseAgent::enable):
3223         (WebCore::InspectorDatabaseAgent::disable):
3224         (WebCore::InspectorDatabaseAgent::restore):
3225         * inspector/InspectorDebuggerAgent.cpp:
3226         (WebCore::InspectorDebuggerAgent::disable):
3227         * inspector/InspectorFileSystemAgent.cpp:
3228         (FileSystemAgentState):
3229         (WebCore):
3230         (WebCore::InspectorFileSystemAgent::enable):
3231         (WebCore::InspectorFileSystemAgent::disable):
3232         (WebCore::InspectorFileSystemAgent::clearFrontend):
3233         (WebCore::InspectorFileSystemAgent::restore):
3234         * inspector/InspectorIndexedDBAgent.cpp:
3235         (IndexedDBAgentState):
3236         (WebCore):
3237         (WebCore::InspectorIndexedDBAgent::restore):
3238         (WebCore::InspectorIndexedDBAgent::enable):
3239         (WebCore::InspectorIndexedDBAgent::disable):
3240         * inspector/InspectorLayerTreeAgent.cpp:
3241         (LayerTreeAgentState):
3242         (WebCore::InspectorLayerTreeAgent::restore):
3243         (WebCore::InspectorLayerTreeAgent::enable):
3244         (WebCore::InspectorLayerTreeAgent::disable):
3245         * inspector/InspectorPageAgent.cpp:
3246         (PageAgentState):
3247         (WebCore::InspectorPageAgent::restore):
3248         (WebCore::InspectorPageAgent::webViewResized):
3249         (WebCore::InspectorPageAgent::enable):
3250         (WebCore::InspectorPageAgent::disable):
3251         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
3252         (WebCore::InspectorPageAgent::removeScriptToEvaluateOnLoad):
3253         (WebCore::InspectorPageAgent::setDeviceMetricsOverride):
3254         (WebCore::InspectorPageAgent::setShowPaintRects):
3255         (WebCore::InspectorPageAgent::setShowFPSCounter):
3256         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
3257         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
3258         (WebCore::InspectorPageAgent::applyScreenWidthOverride):
3259         (WebCore::InspectorPageAgent::applyScreenHeightOverride):
3260         (WebCore::InspectorPageAgent::didPaint):
3261         (WebCore::InspectorPageAgent::didLayout):
3262         (WebCore::InspectorPageAgent::setEmulatedMedia):
3263         (WebCore::InspectorPageAgent::applyEmulatedMedia):
3264         * inspector/InspectorResourceAgent.cpp:
3265         (ResourceAgentState):
3266         (WebCore::InspectorResourceAgent::restore):
3267         (WebCore::InspectorResourceAgent::~InspectorResourceAgent):
3268         (WebCore::InspectorResourceAgent::enable):
3269         (WebCore::InspectorResourceAgent::disable):
3270         * inspector/InspectorState.cpp:
3271         (WebCore::InspectorState::InspectorState):
3272         (WebCore::InspectorState::loadFromCookie):
3273         (WebCore):
3274         (WebCore::InspectorState::mute):
3275         (WebCore::InspectorState::unmute):
3276         (WebCore::InspectorState::updateCookie):
3277         (WebCore::InspectorState::remove):
3278         * inspector/InspectorState.h:
3279         (WebCore):
3280         (InspectorState):
3281         (WebCore::InspectorState::setLong):
3282         * inspector/InspectorTimelineAgent.cpp:
3283         (TimelineAgentState):
3284         (WebCore::InspectorTimelineAgent::restore):
3285         (WebCore::InspectorTimelineAgent::start):
3286         (WebCore::InspectorTimelineAgent::stop):
3287         * inspector/WorkerInspectorController.cpp:
3288         (WebCore::WorkerInspectorController::WorkerInspectorController):
3289         * inspector/WorkerInspectorController.h:
3290         (WebCore):
3291         (WorkerInspectorController):
3292
3293 2012-12-24  Peter Rybin  <prybin@chromium.org>
3294
3295         Web Inspector: Keep LiveEdit API disabled when idle
3296         https://bugs.webkit.org/show_bug.cgi?id=104039
3297
3298         Reviewed by Pavel Feldman.
3299
3300         Guards are added to LiveEdit call
3301
3302         * bindings/v8/ScriptDebugServer.cpp:
3303         (WebCore::ScriptDebugServer::setScriptSource):
3304
3305 2012-12-24  Andrey Lushnikov  <lushnikov@chromium.com>
3306
3307         Web Inspector: refactor TextEditorHighlighter's highlight attributes to dense array
3308         https://bugs.webkit.org/show_bug.cgi?id=105626
3309
3310         Reviewed by Pavel Feldman.
3311
3312         Refactor highlight attributes from sparse array to dense array.
3313
3314         No new tests: no behaviour changes, coverage provided by existing tests.
3315
3316         * inspector/front-end/DefaultTextEditor.js:
3317         (WebInspector.TextEditorMainPanel.prototype._paintLine):
3318         (WebInspector.TextEditorMainPanel.prototype._closingBlockOffset):
3319         * inspector/front-end/TextEditorHighlighter.js:
3320         (WebInspector.TextEditorHighlighter.prototype._highlightLines):
3321
3322 2012-12-21  Alexander Pavlov  <apavlov@chromium.org>
3323
3324         Web Inspector: Make use of the new InspectorState::remove() in inspector agents
3325         https://bugs.webkit.org/show_bug.cgi?id=105438
3326
3327         Reviewed by Yury Semikhatsky.
3328
3329         This patch introduces the following refactorings:
3330         - setting property values of InspectorState to "empty" objects has been replaced by removing them from the state;
3331         - InspectorState instance is no longer shared across agents, so that the property names can no longer clash.
3332           Instead, InspectorCompositeState creates and owns InspectorState instances for every agent;
3333         - agent-specific prefix has been stripped from most property names, where it looked synthetic.
3334         - updateCookie() is called from InspectorState::remove().
3335
3336         No new tests, as there is no visible change in the behavior.
3337
3338         * inspector/InspectorAgent.cpp: Agent-specific property name prefix stripped.
3339         * inspector/InspectorApplicationCacheAgent.cpp: Ditto.
3340         * inspector/InspectorCSSAgent.cpp: Ditto.
3341         * inspector/InspectorCanvasAgent.cpp: Ditto.
3342         * inspector/InspectorController.cpp: Make use of InspectorCompositeState rather than InspectorState.
3343         * inspector/InspectorController.h: Ditto.
3344         * inspector/InspectorDOMStorageAgent.cpp: Agent-specific property name prefix stripped.
3345         * inspector/InspectorDatabaseAgent.cpp: Ditto.
3346         * inspector/InspectorDebuggerAgent.cpp: Ditto.
3347         (WebCore::InspectorDebuggerAgent::disable):
3348         Use "remove" instead of setting an empty object.
3349         * inspector/InspectorFileSystemAgent.cpp: Agent-specific property name prefix stripped.
3350         * inspector/InspectorIndexedDBAgent.cpp: Ditto.
3351         * inspector/InspectorLayerTreeAgent.cpp: Ditto.
3352         * inspector/InspectorPageAgent.cpp: Ditto.
3353         (WebCore::InspectorPageAgent::disable):
3354         Use "remove" instead of setting empty values for certain properties.
3355         (WebCore::InspectorPageAgent::addScriptToEvaluateOnLoad):
3356         Remove unnecessary code (object is created and put into the map if none is found).
3357         * inspector/InspectorResourceAgent.cpp: Agent-specific property name prefix stripped.
3358         (WebCore::InspectorResourceAgent::disable):
3359         Use "remove" instead of setting an empty object for userAgentOverride.
3360         * inspector/InspectorState.cpp: Add InspectorCompositeState.
3361         (WebCore::InspectorState::setFromCookie): Gets invoked from InspectorCompositeState::loadFromCookie().
3362         (WebCore::InspectorState::updateCookie): Call updateCookie().
3363         (WebCore::InspectorCompositeState::createAgentState): Creates an InspectorState instance to be passed to an agent.
3364         * inspector/InspectorState.h: Add InspectorCompositeState.
3365         (WebCore::InspectorState::setLong): Fix cast.
3366         * inspector/InspectorTimelineAgent.cpp: Agent-specific property name prefix stripped.
3367         * inspector/WorkerInspectorController.cpp: Make use of InspectorCompositeState rather than InspectorState.
3368         * inspector/WorkerInspectorController.h: Ditto.
3369
3370 2012-12-23  Dimitri Glazkov  <dglazkov@chromium.org>
3371
3372         Split fast-rejection filter logic off SelectorChecker.
3373         https://bugs.webkit.org/show_bug.cgi?id=105660
3374
3375         The awesome Bloom filter and parent stack logic don't need to be in SelectorChecker. They nicely factor out
3376         into their own pretty thing, named thereby SelectorFilter.
3377
3378         Reviewed by Eric Seidel.
3379
3380         No change in functionality, covered by existing tests.
3381
3382         * CMakeLists.txt: Added SelectorFilter to build systems.
3383         * GNUmakefile.list.am: Ditto.
3384         * Target.pri: Ditto.
3385         * WebCore.gypi: Ditto.
3386         * WebCore.xcodeproj/project.pbxproj: Ditto.
3387         * css/CSSAllInOne.cpp: Ditto.
3388         * css/RuleSet.cpp: Changed to use SelectorFilter.
3389         (WebCore::RuleData::RuleData): Ditto.
3390         * css/SelectorChecker.cpp: Ditto.
3391         * css/SelectorChecker.h: Ditto.
3392         (SelectorChecker):
3393         * css/StyleResolver.cpp: Ditto.
3394         (WebCore):
3395         (WebCore::StyleResolver::pushParentElement): Ditto.
3396         (WebCore::StyleResolver::popParentElement): Ditto.
3397         (WebCore::StyleResolver::collectMatchingRulesForList): Ditto.
3398         * css/StyleResolver.h:
3399         (StyleResolver): Ditto.
3400
3401 2012-12-23  Qiankun Miao  <qiankun.miao@intel.com>
3402
3403         Remove unused reference to "class LayerChromium"
3404         https://bugs.webkit.org/show_bug.cgi?id=105502
3405
3406         Reviewed by Kentaro Hara.
3407
3408         class LayerChromium doesn't exist any more. Just remove the unused
3409         code.
3410
3411         * platform/graphics/chromium/Canvas2DLayerBridge.h:
3412
3413 2012-12-23  Alexey Proskuryakov  <ap@apple.com>
3414
3415         <rdar://problem/12808377> Network process should respect cookie accept policy
3416         https://bugs.webkit.org/show_bug.cgi?id=105684
3417
3418         Reviewed by Sam Weinig.
3419
3420         Changed cookie change observer to not use platform strategies, to make it usable
3421         in NetworkProcess. startObservingCookieChanges() now just takes a callback pointer.
3422
3423         * WebCore.exp.in:
3424         * platform/CookiesStrategy.h:
3425         * platform/network/CookieStorage.h:
3426         * platform/network/cf/CookieStorageCFNet.cpp:
3427         (WebCore::notifyCookiesChangedOnMainThread):
3428         (WebCore::startObservingCookieChanges):
3429         * platform/network/mac/CookieStorageMac.mm:
3430         (-[WebCookieStorageObjCAdapter notifyCookiesChangedOnMainThread]):
3431         (-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
3432         (WebCore::startObservingCookieChanges):
3433
3434 2012-12-23  Tony Chang  <tony@chromium.org>
3435
3436         [Qt][Mac] Unreviewed fix the build after r138413
3437         https://bugs.webkit.org/show_bug.cgi?id=105686
3438
3439         Don't use a temporary const reference so the compiler doesn't make a copy.
3440         An example compile error (clang):
3441         Source/WebCore/loader/CookieJar.cpp:73:67: error: copying parameter of type 'WebCore::NetworkStorageSession' invokes deleted constructor
3442             return platformStrategies()->cookiesStrategy()->cookiesForDOM(SESSION(document), document->firstPartyForCookies(), url);
3443
3444         * loader/CookieJar.cpp:
3445         (WebCore::cookies):
3446         (WebCore::setCookies):
3447         (WebCore::cookiesEnabled):
3448         (WebCore::cookieRequestHeaderFieldValue):
3449         (WebCore::getRawCookies):
3450         (WebCore::deleteCookie):
3451
3452 2012-12-22  Alexey Proskuryakov  <ap@apple.com>
3453
3454         Add a separate class for networking related storage
3455         https://bugs.webkit.org/show_bug.cgi?id=105676
3456
3457         Reviewed by Sam Weinig.
3458
3459         NetworkingContext combines a reference to storage (cookies and more) and data that's
3460         only meaningful when loading. This makes it very ugly to use for cookie manipulation
3461         when there is no load (e.g. for document.cookie).
3462
3463         Adding NetworkStorageSession, which encorportes network-related sesion data, such
3464         as cookies and session HTTP credentials.
3465
3466         For some ports, refactoring is not finished, NetworkStorageSession being a wrapper
3467         for NetworkingContext.
3468
3469         * CMakeLists.txt:
3470         * GNUmakefile.list.am:
3471         * Target.pri:
3472         * WebCore.exp.in:
3473         * WebCore.gypi:
3474         * WebCore.vcproj/WebCore.vcproj:
3475         * WebCore.xcodeproj/project.pbxproj:
3476         Updated for new files and functions.
3477
3478         * platform/network/PlatformCookieJar.h:
3479         * loader/CookieJar.cpp:
3480         * platform/CookiesStrategy.h:
3481         * platform/network/cf/CookieJarCFNet.cpp:
3482         * platform/network/chromium/CookieJarChromium.cpp:
3483         * platform/network/curl/CookieJarCurl.cpp:
3484         * platform/network/mac/CookieJarMac.mm:
3485         * platform/network/qt/CookieJarQt.cpp:
3486         * platform/network/soup/CookieJarSoup.cpp:
3487         * platform/network/win/CookieJarWin.cpp:
3488         PlatformCookieJar and strategy cookie functions now take a NetworkStorageSession
3489         instead of NetworkingContext.
3490         Note that they take a const reference to support creating a temporary session
3491         wrapper for ports that just wrap a NetworkingContext.
3492
3493         * loader/ResourceLoader.cpp:
3494         * loader/cache/CachedResource.h:
3495         * platform/network/BlobResourceHandle.cpp:
3496         * platform/network/ResourceHandle.cpp:
3497         * platform/network/ResourceHandle.h:
3498         * platform/network/ResourceHandleInternal.h:
3499         * platform/network/chromium/ResourceHandle.cpp:
3500         * platform/network/curl/ResourceHandleCurl.cpp:
3501         * platform/network/mac/ResourceHandleMac.mm:
3502         * platform/network/qt/QNetworkReplyHandler.cpp:
3503         * platform/network/soup/DNSSoup.cpp:
3504         * platform/network/soup/ResourceHandleSoup.cpp:
3505         * platform/network/win/ResourceHandleWin.cpp:
3506         ResourceHandle no longer includes unneeded NetworkingContext.h and AuthenticationClient.h.
3507         This avoids near-world rebuilds on any NetworkingContext change.
3508
3509         * platform/network/NetworkStorageSession.h: Added.
3510         * platform/network/NetworkStorageSessionStub.cpp: Added.
3511         * platform/network/cf/NetworkStorageSessionCFNet.cpp: Added.
3512         Good new stuff. Stub version just wraps NetworkingContext for platforms that still
3513         need to finish the refactoring.
3514
3515         * platform/network/NetworkingContext.h:
3516         The context now has a NetworkStorageSession, and doesn't expose CFNet level objects directly.
3517
3518         * platform/network/cf/CookieStorageCFNet.cpp:
3519         * platform/network/cf/CookieStorageCFNet.h: Removed.
3520         We no longer have separate free functions to track storage, it's part of NetworkStorageSession now.
3521
3522         * platform/network/cf/ResourceHandleCFNet.cpp: Updated to use NetworkStorageSession.
3523
3524         * platform/network/mac/CookieStorageMac.mm: Dont include CookieStorageCFNet.h, it
3525         was not needed.
3526
3527 2012-12-22  Nico Weber  <thakis@chromium.org>
3528
3529         InlineTextBox: Remove potentially confusing "} if" pattern.
3530         https://bugs.webkit.org/show_bug.cgi?id=105499
3531
3532         Reviewed by Ojan Vafai.
3533
3534         It's not clear to me on first look if this is intentional or missing
3535         an "else" (and this pattern was used in just one other place in
3536         webkit, which I've removed). It turns out no else is missing here,
3537         this is checked by fast/text/justified-selection.html
3538
3539         * rendering/InlineTextBox.cpp:
3540         (WebCore::paintTextWithShadows):
3541
3542 2012-12-21  Jan Keromnes  <janx@linux.com>
3543
3544         Web Inspector: Update CodeMirror to stable
3545         https://bugs.webkit.org/show_bug.cgi?id=105653
3546
3547         Reviewed by Pavel Feldman.
3548
3549         Fixes several minor issues, including throw scroll on mac.
3550
3551         * inspector/front-end/cm/codemirror.css:
3552         (.cm-negative):
3553         (.cm-positive):
3554         (.CodeMirror-gutter):
3555         (.cm-searching):
3556         * inspector/front-end/cm/codemirror.js:
3557         (window.CodeMirror):
3558         (window.CodeMirror.):
3559         * inspector/front-end/cm/css.js:
3560         (.):
3561         * inspector/front-end/cm/htmlmixed.js:
3562         (.):
3563         * inspector/front-end/cm/javascript.js:
3564         (.):
3565         * inspector/front-end/cm/xml.js:
3566
3567 2012-12-21  Elliott Sprehn  <esprehn@chromium.org>
3568
3569         Replace documentFragmentIsShadowRoot with isTreeScope
3570         https://bugs.webkit.org/show_bug.cgi?id=105345
3571
3572         Reviewed by Dimitri Glazkov.
3573
3574         We can replace documentFragmentIsShadowRoot with isTreeScope() which is
3575         trival to detect by checking treeScope()->rootNode() == this. To do this
3576         we must stop adopting ShadowRoots into the document when they're removed,
3577         which was always wrong anyway as it meant that the TreeScope of a ShadowRoot
3578         was no longer itself after it had been removed. It also meant that the
3579         children of a ShadowRoot that was removed were no longer in it's tree scope
3580         despite being descendants of it.
3581
3582         Making this simplification allows further simplication like
3583         Node::containingShadowRoot can be made O(1) instead of O(k) where k is
3584         the depth of the node.
3585
3586         No new tests, just refactoring.
3587
3588         * WebCore.exp.in:
3589         * dom/DocumentFragment.h:
3590         (DocumentFragment):
3591         * dom/ElementShadow.cpp:
3592         (WebCore::ElementShadow::removeAllShadowRoots):
3593         * dom/Node.cpp:
3594         (WebCore::Node::setTreeScope):
3595         (WebCore::Node::isTreeScope):
3596         (WebCore):
3597         * dom/Node.h:
3598         (Node):
3599         (WebCore::Node::isShadowRoot):
3600         * dom/ShadowRoot.cpp:
3601         (WebCore::ShadowRoot::~ShadowRoot):
3602         * dom/ShadowRoot.h:
3603         (ShadowRoot):
3604
3605 2012-12-21  Xianzhu Wang  <wangxianzhu@chromium.org>
3606
3607         [Chromium-Android] Use harfbuzz-ng instead of harfbuzz-old on Android
3608         https://bugs.webkit.org/show_bug.cgi?id=104410
3609
3610         Using harfbuzz-ng we can avoid many bugs of the obsolete harfbuzz-old.
3611
3612         Reviewed by Eric Seidel.
3613
3614         No new tests. No change of functionality. Existing tests should pass.
3615
3616         * WebCore.gyp/WebCore.gyp: Use harfbuzz-ng on Android.
3617
3618 2012-12-21  Joshua Bell  <jsbell@chromium.org>
3619
3620         IndexedDB: Combine openConnection and openConnectionWithVersion
3621         https://bugs.webkit.org/show_bug.cgi?id=105658
3622
3623         Reviewed by Tony Chang.
3624
3625         Combine the logic from these two methods. Mostly a refactor, but in the "pending calls"
3626         case the behavior is slightly altered since the version and no-version queues were
3627         previously separate, so the order changes. The new order matches the spec and FF/IE
3628         behavior, and a test is added to verify this.
3629
3630         Chromium's webkit_unit_tests rely on a quirk to bypass the upgrade mechanism; the usage
3631         is slightly altered and made more explicit, and requires a small amount of test-only code.
3632
3633         Test: storage/indexeddb/open-ordering.html
3634
3635         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3636         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
3637         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
3638         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3639         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
3640         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
3641         (WebCore::IDBDatabaseBackendImpl::openConnection):
3642         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3643         (WebCore::IDBDatabaseBackendImpl::close):
3644         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3645         (IDBDatabaseBackendImpl):
3646         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3647         (WebCore::IDBFactoryBackendImpl::open):
3648
3649 2012-12-21  Brady Eidson  <beidson@apple.com>
3650
3651         Update localizable strings as a followup to http://trac.webkit.org/changeset/138387
3652         https://bugs.webkit.org/show_bug.cgi?id=105592
3653
3654         Rubberstamped by Alexey Proskuryakov.
3655
3656         * English.lproj/Localizable.strings: Added a new error string.
3657
3658 2012-12-21  Kenneth Russell  <kbr@google.com>
3659
3660         Expose ArrayBufferView constructor on DOMWindow
3661         https://bugs.webkit.org/show_bug.cgi?id=105605
3662
3663         Reviewed by Sam Weinig.
3664
3665         Update IDL to track recent spec change exposing ArrayBufferView
3666         constructor on DOMWindow for instanceof checks. There are no
3667         constructors exposed in the Web IDL, however, so calling it via
3668         operator new throws TypeError.
3669
3670         Test (updated): fast/canvas/webgl/array-unit-tests.html
3671
3672         * html/canvas/ArrayBufferView.idl:
3673             Removed OmitConstructor attribute.
3674         * page/DOMWindow.idl:
3675             Exposed ArrayBufferView constructor function attribute.
3676
3677 2012-12-21  Brady Eidson  <beidson@apple.com>
3678
3679         Remove ResourceLoadScheduler::addMainResourceLoad and all related code
3680         <rdar://problem/12925275> and https://bugs.webkit.org/show_bug.cgi?id=105644
3681
3682         Reviewed by Alexey Proskuryakov.
3683
3684         Now that main resources loads are scheduled (bug 49246) we don't need this stuff anymore.
3685
3686         No new tests (No change in behavior).
3687
3688         * WebCore.exp.in:
3689         * loader/ResourceLoadScheduler.cpp:
3690         * loader/ResourceLoadScheduler.h:
3691
3692 2012-12-21  Viatcheslav Ostapenko  <sl.ostapenko@samsung.com>
3693
3694         [WebGL][EFL][Qt] Transparent canvas composited non-transparent
3695         https://bugs.webkit.org/show_bug.cgi?id=105325
3696
3697         Reviewed by Kenneth Rohde Christiansen.
3698
3699         glXPixmap is always created without alpha channel because 1st GLXFBConfig 
3700         in a list doesn't support transparency. 
3701         Use the same code that is used to find GLXFBConfig with alpha for window 
3702         creation in GraphicsSurfacePrivate::createPixmap(). Code is moved to 
3703         findFBConfigWithAlpha() method.
3704
3705         Covered by fast/canvas/webgl/webgl-composite-modes-repaint.html
3706
3707         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
3708         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
3709         (WebCore::GraphicsSurfacePrivate::createPixmap):
3710         (WebCore::GraphicsSurfacePrivate::findFBConfigWithAlpha):
3711         (GraphicsSurfacePrivate):
3712
3713 2012-12-21  Dimitri Glazkov  <dglazkov@chromium.org>
3714
3715         Unreviewed, rolling out r138376.
3716         http://trac.webkit.org/changeset/138376
3717         https://bugs.webkit.org/show_bug.cgi?id=104995
3718
3719         Broke a bunch of tests on mac.
3720
3721         * dom/ShadowRoot.cpp:
3722         (WebCore::ShadowRoot::nodeName):
3723         (WebCore):
3724         * dom/ShadowRoot.h:
3725         (ShadowRoot):
3726
3727 2012-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3728
3729         Unreviewed, rolling out r138237.
3730         http://trac.webkit.org/changeset/138237
3731         https://bugs.webkit.org/show_bug.cgi?id=105637
3732
3733         Regresses web inspector's editor performance. (Requested by
3734         pfeldman on #webkit).
3735
3736         * inspector/front-end/DefaultTextEditor.js:
3737         (WebInspector.TextEditorChunkedPanel.prototype._splitChunkOnALine):
3738         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
3739         (WebInspector.TextEditorMainChunk.prototype.expand):
3740
3741 2012-12-21  Ilya Tikhonovsky  <loislo@chromium.org>
3742
3743         Various tests in media/track are intermittently crashing.
3744         https://bugs.webkit.org/show_bug.cgi?id=105606
3745
3746         Reviewed by Eric Seidel.
3747
3748         The root of problem is the fact that we update tracks even if we are in process of deleting the document.
3749         Media element can stop doing that if the document informed the element via ::stop that it is going away.
3750
3751         * html/HTMLMediaElement.cpp:
3752         (WebCore::HTMLMediaElement::endIgnoringTrackDisplayUpdateRequests):
3753
3754 2012-12-21  Alexei Svitkine  <asvitkine@chromium.org>
3755
3756         [Chromium/Mac] Don't send an onclick event from a ctrl-click
3757         https://bugs.webkit.org/show_bug.cgi?id=105554
3758
3759         Reviewed by Dimitri Glazkov.
3760
3761         Don't send the onclick event on a control click event (which
3762         triggers the context menu on the Mac). This matches the
3763         behaviour of the Apple Mac port, although the Apple port
3764         does this by checking whether the context menu is visible
3765         in WebPage::mouseEvent().
3766
3767         This is a fix for http://crbug.com/146143
3768
3769         Test: fast/events/controlclick-no-onclick.html
3770
3771         * page/EventHandler.cpp:
3772         (WebCore::EventHandler::handleMouseReleaseEvent):
3773
3774 2012-12-21  Shinya Kawanaka  <shinyak@chromium.org>
3775
3776         Implement ShadowRoot::elementFromPoint
3777         https://bugs.webkit.org/show_bug.cgi?id=104579
3778
3779         Reviewed by Dimitri Glazkov.
3780
3781         Move elementFromPoint and nodeFromPoint to TreeScope from Document so that ShadowRoot can call it.
3782         In the elementFromPoint(), the element taken by nodeFromPoint is not in the same tree scope, its ancestor is returned.
3783
3784         Since nodeFromPoint does not return the shadow ancestor of the result node, I don't make it TreeScope method.
3785
3786         Test: fast/dom/shadow/elementfrompoint.html
3787
3788         * dom/Document.cpp:
3789         (WebCore::Document::elementFromPoint): Code is shared with TreeScope.
3790         (WebCore::Document::caretRangeFromPoint):
3791         * dom/ShadowRoot.idl:
3792         * dom/TreeScope.cpp:
3793         (WebCore::nodeFromPoint): Moved from Document.cpp
3794         (WebCore):
3795         (WebCore::TreeScope::elementFromPoint):
3796         * dom/TreeScope.h:
3797         (WebCore):
3798         (TreeScope):
3799
3800 2012-12-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3801
3802         [EFL][WK2] Never create WebCore scrollbars for EFL/WK2
3803         https://bugs.webkit.org/show_bug.cgi?id=105632
3804
3805         Reviewed by Antonio Gomes.
3806
3807         For delegates scroll we must not use the scroll animator,
3808         or similar as those depends on creating WebCore scrollbars.
3809
3810         Handle the wheel event manually for delegates scrolling.
3811
3812         * page/FrameView.cpp:
3813         (WebCore::FrameView::wheelEvent):
3814
3815 2012-12-21  Shinya Kawanaka  <shinyak@chromium.org>
3816
3817         [Shadow DOM]: ShadowRoot wrong nodeName attribute
3818         https://bugs.webkit.org/show_bug.cgi?id=104995
3819
3820         Reviewed by Dimitri Glazkov.
3821
3822         According to the Shadow DOM spec, ShadowRoot.nodeName should return '#document-fragment' instead of '#shadow-root'.
3823         We remove ShadowRoot::nodeName.
3824
3825         No new tests, covered by existing tests.
3826
3827         * dom/ShadowRoot.cpp:
3828         * dom/ShadowRoot.h:
3829         (ShadowRoot):
3830
3831 2012-12-21  Mihai Parparita  <mihaip@chromium.org>
3832
3833         Slow performance with <select> with many options and size >= 2
3834         https://bugs.webkit.org/show_bug.cgi?id=105483
3835
3836         Reviewed by Eric Seidel.
3837         
3838         Avoids creating renderers for children of list <select>s that are not
3839         <option> or <optgroup>. This is both more correct (no other browser
3840         displays them) and provides a performance benefit (direct text children 
3841         of <select> would have O(N^2) behavior; this usually happened due to
3842         whitespace between <option>...</option> tags).
3843
3844         Test: fast/forms/menulist-no-renderer-for-unexpected-children.html
3845
3846         * html/HTMLSelectElement.cpp:
3847         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
3848
3849 2012-12-21  Keishi Hattori  <keishi@webkit.org>
3850
3851         Fix typing zero into multiple field input
3852         https://bugs.webkit.org/show_bug.cgi?id=105501
3853
3854         Reviewed by Kent Tamura.
3855
3856         We have a couple of problems when handling zero in a multiple fields
3857         element.
3858         1. Typing '02' into a month field will set '12'.
3859         2. Typing '0' into 12 hour hour field will set '12' and move to the 
3860            focus to the next field.
3861         This change adds a type ahead buffer so we can handle these cases
3862         properly. If the value in the type ahead buffer is valid we set it so a
3863         change event will fire.
3864
3865         Added tests to *-multiple-fields-keyboard-events.html.
3866
3867         * html/shadow/DateTimeNumericFieldElement.cpp:
3868         (WebCore::DateTimeNumericFieldElement::didBlur): Clear the type ahead
3869         buffer. handleKeyboardEvent() won't set the type ahead value if it is
3870         not in range, so we set the value here.
3871         (WebCore::DateTimeNumericFieldElement::handleKeyboardEvent):
3872         (WebCore::DateTimeNumericFieldElement::setEmptyValue): Clear type ahead buffer.
3873         (WebCore::DateTimeNumericFieldElement::setValueAsInteger):
3874         (WebCore::DateTimeNumericFieldElement::stepDown): Clear type ahead buffer.
3875         (WebCore::DateTimeNumericFieldElement::stepUp): Clear type ahead buffer.
3876         (WebCore::DateTimeNumericFieldElement::typeAheadValue): Returns integer
3877         value for the type ahead characters.
3878         (WebCore):
3879         (WebCore::DateTimeNumericFieldElement::visibleValue): If we have type
3880         ahead characters, show that.
3881         * html/shadow/DateTimeNumericFieldElement.h:
3882         (DateTimeNumericFieldElement):
3883
3884 2012-12-21  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3885
3886         [GStreamer] Buffering ranges are reported incorrectly with GStreamer 1.0
3887         https://bugs.webkit.org/show_bug.cgi?id=105319
3888
3889         Reviewed by Philippe Normand.
3890
3891         We add the gPercentMax constant to select between 100 and
3892         GST_FORMAT_PERCENT_MAX depending if we are compiling against
3893         GStreamer 0.10 or 1.0 and we use that in the corresponding method.
3894
3895         Current tests should suffice.
3896
3897         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3898         (WebCore::MediaPlayerPrivateGStreamer::buffered): Added the use of
3899         gPercentMax constant instead of 100 to have the different code
3900         paths for GStreamer 0.10 and 1.0.
3901
3902 2012-12-21  Tim Horton  <timothy_horton@apple.com>
3903
3904         PDFPlugin: Cannot drop files/URLs on PDFPlugin
3905         https://bugs.webkit.org/show_bug.cgi?id=105516
3906         <rdar://problem/12729443>
3907
3908         Reviewed by Alexey Proskuryakov.
3909
3910         * page/DragController.cpp:
3911         (WebCore::DragController::operationForLoad): If we drag over a PluginDocument, check if its PluginView
3912         claims to support navigation resulting from a drag (only PDFPlugin will for now). If it does, allow the drag.
3913         * plugins/PluginViewBase.h:
3914         (WebCore::PluginViewBase::shouldAllowNavigationFromDrags): Add shouldAllowNavigationFromDrags.
3915
3916 2012-12-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3917
3918         Unreviewed, rolling out r138338.
3919         http://trac.webkit.org/changeset/138338
3920         https://bugs.webkit.org/show_bug.cgi?id=105621
3921
3922         speculative rollout because fast/dom/shadow/content-element-
3923         distributed-nodes.html is crashing on linux debug. (Requested
3924         by loislo on #webkit).
3925
3926         * WebCore.exp.in:
3927         * dom/DocumentFragment.h:
3928         * dom/Node.cpp:
3929         (WebCore::Node::documentFragmentIsShadowRoot):
3930         (WebCore):
3931         * dom/Node.h:
3932         (Node):
3933         (WebCore::Node::isShadowRoot):
3934         * dom/ShadowRoot.h:
3935
3936 2012-12-21  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3937
3938         MediaStream API: Update the MediaStream constructor
3939         https://bugs.webkit.org/show_bug.cgi?id=98416
3940
3941         Reviewed by Adam Barth.
3942
3943         Updated the MediaStream constructor to support the more general argument
3944         list from the latest Media Capture and Streams specification:
3945         http://dev.w3.org/2011/webrtc/editor/getusermedia.html
3946
3947         Added more test cases to existing tests.
3948
3949         * Modules/mediastream/MediaStream.cpp:
3950         (WebCore::containsSource):
3951         (WebCore):
3952         (WebCore::processTrack):
3953         (WebCore::createFromSourceVectors):
3954         (WebCore::MediaStream::create):
3955         * Modules/mediastream/MediaStream.h:
3956         * Modules/mediastream/MediaStream.idl:
3957
3958 2012-12-20  Ryosuke Niwa  <rniwa@webkit.org>
3959
3960         More fix after r138348.
3961
3962         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3963         (WebCore::SocketStreamHandle::createStreams):
3964
3965 2012-12-20  Alexey Proskuryakov  <ap@apple.com>
3966
3967         Disable Nagle algorithm on WebSocket implementation for CF.
3968         https://bugs.webkit.org/show_bug.cgi?id=102079
3969
3970         Build fix. Disable the new code on Lion, _kCFStreamSocketSetNoDelay apparently
3971         cannot be used on this OS version.
3972
3973         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3974         (WebCore::SocketStreamHandle::createStreams):
3975
3976 2012-12-20  KyungTae Kim  <ktf.kim@samsung.com>
3977
3978         Fix build warnings related with gstreamer
3979         https://bugs.webkit.org/show_bug.cgi?id=105614
3980
3981         Reviewed by Kentaro Hara.
3982
3983         The below functions have unused parameters.
3984         Remove the parameter names to fix 'unused parameter' build warnings.
3985
3986         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3987         (WebCore::onGStreamerWavparsePadAddedCallback):
3988         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3989         (WebCore::messageCallback):
3990         (WebCore::onGStreamerDeinterleavePadAddedCallback):
3991         (WebCore::onGStreamerDeinterleaveReadyCallback):
3992         (WebCore::onGStreamerDecodebinPadAddedCallback):
3993
3994 2012-12-20  Takashi Toyoshima  <toyoshim@chromium.org>
3995
3996         Disable Nagle algorithm on WebSocket implementation for CF.
3997         https://bugs.webkit.org/show_bug.cgi?id=102079
3998
3999         Reviewed by Alexey Proskuryakov.
4000
4001         Set TCP_NODELAY on CFWriteStream for SocketStreamHandle to improve
4002         communication latency. Combination of Nagle and delayed-ACK could
4003         affect performance in some environment, e.g., over Wifi network.
4004
4005         * platform/network/cf/SocketStreamHandleCFNet.cpp:
4006         (WebCore::SocketStreamHandle::createStreams):
4007
4008 2012-12-20  Huang Dongsung  <luxtella@company100.net>
4009
4010         [WebGL][EFL][Qt][GTK] Jelly fishes leave trails on webgl canvas.
4011         https://bugs.webkit.org/show_bug.cgi?id=105326
4012
4013         Reviewed by Noam Rosenthal.
4014
4015         Clear a drawing buffer after compositing if preserveDrawingBuffer is
4016         false.
4017         http://www.khronos.org/registry/webgl/specs/latest/#2.2
4018
4019         No new tests. Covered by existing webgl-preserve-drawing-buffer-repaint test.
4020
4021         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
4022         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
4023         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
4024         (GraphicsContext3DPrivate::copyToGraphicsSurface):
4025         * platform/graphics/qt/GraphicsContext3DQt.cpp:
4026         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
4027         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
4028
4029 2012-12-20  Filip Pizlo  <fpizlo@apple.com>
4030
4031         Create a variable name for a RAII scope so it doesn't die immediately.
4032
4033         Reviewed by Sam Weinig.
4034
4035         No new tests.