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