Split LayoutTypes.h to improve compile time
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-08-27  Nikhil Bhargava  <nbhargava@google.com>
2
3         Split LayoutTypes.h to improve compile time
4         https://bugs.webkit.org/show_bug.cgi?id=95107
5
6         Reviewed by Eric Seidel.
7
8         The inlines from LayoutTypes.h are moved to LayoutTypesInlineMethods.h.
9         Files that only need the types to be forward declared, don't need to
10         include definitions for FractionalLayout items (those are expensive to
11         include)
12
13         No new tests. Functionality should be the same.
14
15         * WebCore.gypi:
16         * accessibility/AccessibilityObject.h:
17         * css/LengthFunctions.cpp:
18         * dom/DocumentMarkerController.h:
19         * dom/Node.h:
20         * inspector/InspectorOverlay.h:
21         * inspector/InspectorTimelineAgent.h:
22         * inspector/TimelineRecordFactory.h:
23         * loader/SubframeLoader.h:
24         * page/FocusController.h:
25         * page/Page.h:
26         * platform/Length.h:
27         * platform/PopupMenuClient.h:
28         * platform/graphics/transforms/TransformationMatrix.cpp:
29         * platform/graphics/transforms/TransformationMatrix.h:
30         * rendering/AutoTableLayout.h:
31         * rendering/FixedTableLayout.h:
32         * rendering/HitTestingTransformState.cpp:
33         * rendering/LayoutTypes.h:
34         * rendering/LayoutTypesInlineMethods.h: Added.
35         (WebCore):
36         * rendering/RenderMenuList.h:
37         * rendering/RenderThemeChromiumCommon.h:
38         * rendering/TextAutosizer.h:
39         * rendering/style/ShadowData.cpp:
40         * rendering/style/ShadowData.h:
41         * rendering/style/WrapShapes.h:
42         * rendering/svg/SVGRenderSupport.h:
43         * rendering/svg/SVGRenderingContext.h:
44         * svg/graphics/SVGImage.h:
45
46 2012-08-27  James Robinson  <jamesr@chromium.org>
47
48         [chromium] Put CCThreadImpl / WebCompositorImpl in webcore_chromium_compositor_files gyp section
49         https://bugs.webkit.org/show_bug.cgi?id=94995
50
51         Reviewed by Adrienne Walker.
52
53         These need to be controllable by use_libcc_for_compositor
54
55         * WebCore.gypi:
56
57 2012-08-27  Simon Fraser  <simon.fraser@apple.com>
58
59         If both left and right (or top and bottom) are specified for sticky, use left (or top)
60         https://bugs.webkit.org/show_bug.cgi?id=95146
61
62         Reviewed by Dan Bernstein.
63
64         Remove the incorrect FIXME comment, and swap the left and right,
65         and top and bottom constraints so that left and top win out,
66         as they do for position:relative.
67
68         Test: fast/css/sticky/sticky-both-sides.html
69
70         * rendering/RenderBoxModelObject.cpp:
71         (WebCore::RenderBoxModelObject::stickyPositionOffset):
72
73 2012-08-27  Adam Barth  <abarth@webkit.org>
74
75         [V8] Improve the names of some private functions of V8DOMWindowShell.cpp
76         https://bugs.webkit.org/show_bug.cgi?id=95132
77
78         Reviewed by Eric Seidel.
79
80         V8DOMWindowShell has a concept of a "DocumentWrapperCache", but that's
81         more easily understood as the "document" property of the Window. This
82         patch renames a couple functions to make this clearer.
83
84         This patch as renames disposeContextHandles to disposeContext because
85         that's what's actually happening.
86
87         * bindings/v8/V8DOMWindowShell.cpp:
88         (WebCore::V8DOMWindowShell::isContextInitialized):
89         (WebCore::V8DOMWindowShell::disposeContext):
90         (WebCore::V8DOMWindowShell::clearForClose):
91         (WebCore::V8DOMWindowShell::clearForNavigation):
92         (WebCore):
93         (WebCore::V8DOMWindowShell::initializeIfNeeded):
94         (WebCore::V8DOMWindowShell::updateDocumentProperty):
95         (WebCore::V8DOMWindowShell::clearDocumentProperty):
96         (WebCore::V8DOMWindowShell::updateDocument):
97         * bindings/v8/V8DOMWindowShell.h:
98         (V8DOMWindowShell):
99
100 2012-08-24  James Robinson  <jamesr@chromium.org>
101
102         WebGL should not flip textures on presentation if contents are unchanged
103         https://bugs.webkit.org/show_bug.cgi?id=94961
104
105         Reviewed by Kenneth Russell.
106
107         For WebGL contexts where antialias and preserveDrawingBuffer are false, chromium implements DrawingBuffer using
108         two textures and flips them on presentation. If the page hasn't actually rendered anything into the WebGL
109         context since the last presentation, this makes an old frame available. This fixes the bug by marking the
110         DrawingBuffer when its contents change.
111
112         Test: compositing/webgl/webgl-repaint.html
113
114         * html/canvas/WebGLRenderingContext.cpp:
115         (WebCore):
116         (WebCore::WebGLRenderingContext::markContextChanged):
117         * platform/graphics/chromium/DrawingBufferChromium.cpp:
118         (WebCore::DrawingBuffer::DrawingBuffer):
119         (WebCore::DrawingBuffer::prepareBackBuffer):
120         * platform/graphics/gpu/DrawingBuffer.h:
121         (WebCore::DrawingBuffer::markContentsChanged):
122         (DrawingBuffer):
123
124 2012-08-27  Adam Barth  <abarth@webkit.org>
125
126         [V8] Clean up V8DOMWindowShell's findFrame
127         https://bugs.webkit.org/show_bug.cgi?id=95130
128
129         Reviewed by Eric Seidel.
130
131         This patch just deletes a bunch of unneeded variables from findFrame
132         and adds an ASSERT for what a comment claims to be true.
133
134         * bindings/v8/V8DOMWindowShell.cpp:
135         (WebCore::findFrame):
136
137 2012-08-27  Roger Fong  <roger_fong@apple.com>
138
139         Hook procedure should check to see if hook has already been removed before attempting removal.
140         https://bugs.webkit.org/show_bug.cgi?id=95118
141
142         Reviewed by Simon Fraser.
143
144         When the hookFired method in LayerChangesFlusher.cpp gets called in response to a message posted to the message queue
145         it calls CallNextHook to pass the message to the next hook procedure in the hook chain.
146         
147         Sometimes, the message can get passed to another hook procedure that can dispatch another message. 
148         This message gets passed back through the hook chain and we eventually re-enter the hookFired method.
149
150         When that hookFired call completes, it may remove the hook. 
151         When CallNextHook returns, the original call to hookFired may try to remove the hook as well. 
152         However, there is no need as the hook as already been removed.
153         This results in an assertion failure, assert(m_hook), when we call removeHook.
154
155         * platform/graphics/ca/win/LayerChangesFlusher.cpp:
156         (WebCore::LayerChangesFlusher::hookFired):
157         Simply check to see if the hook has already been removed before actually trying to remove it.
158
159 2012-08-24  James Robinson  <jamesr@chromium.org>
160
161         [chromium] Clean up dependencies of WebScrollbar and WebScrollbarLayer
162         https://bugs.webkit.org/show_bug.cgi?id=94996
163
164         Reviewed by Adrienne Walker.
165
166         Moves WebScrollbarImpl into WebCore/platform/support to make it accessible to chromium-specific WebCore code and
167         uses it to construct WebScrollbar instances around WebCore::Scrollbars.
168
169         * WebCore.gypi:
170         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
171         (WebCore::createScrollbarLayer):
172         * platform/chromium/support/WebScrollbarImpl.cpp: Renamed from Source/WebKit/chromium/src/WebScrollbarImpl.cpp.
173         (WebKit):
174         (WebKit::WebScrollbarImpl::WebScrollbarImpl):
175         (WebKit::WebScrollbarImpl::isOverlay):
176         (WebKit::WebScrollbarImpl::value):
177         (WebKit::WebScrollbarImpl::location):
178         (WebKit::WebScrollbarImpl::size):
179         (WebKit::WebScrollbarImpl::enabled):
180         (WebKit::WebScrollbarImpl::maximum):
181         (WebKit::WebScrollbarImpl::totalSize):
182         (WebKit::WebScrollbarImpl::isScrollViewScrollbar):
183         (WebKit::WebScrollbarImpl::isScrollableAreaActive):
184         (WebKit::WebScrollbarImpl::getTickmarks):
185         (WebKit::WebScrollbarImpl::controlSize):
186         (WebKit::WebScrollbarImpl::pressedPart):
187         (WebKit::WebScrollbarImpl::hoveredPart):
188         (WebKit::WebScrollbarImpl::scrollbarOverlayStyle):
189         (WebKit::WebScrollbarImpl::orientation):
190         (WebKit::WebScrollbarImpl::isCustomScrollbar):
191         * platform/chromium/support/WebScrollbarImpl.h: Renamed from Source/WebKit/chromium/src/WebScrollbarImpl.h.
192         (WebCore):
193         (WebKit):
194         (WebScrollbarImpl):
195
196 2012-08-27  Tony Chang  <tony@chromium.org>
197
198         Make RenderBox::computePositionedLogicalHeight const
199         https://bugs.webkit.org/show_bug.cgi?id=94984
200
201         Reviewed by Ojan Vafai.
202
203         This is step 1 in making computeLogical{Height,Width} const.
204         computeLogicalHeight calls computePositionedLogicalHeight, so this patch
205         makes that const first.
206
207         No new tests, just refactoring.  Covered by fast/block/positioning/differing-writing-modes-replaced.html
208         and others.
209
210         * rendering/RenderBox.cpp:
211         (WebCore::RenderBox::computeLogicalHeight): Call const version of computePositionedLogicalHeight.
212         (WebCore::RenderBox::computePositionedLogicalHeight): Make const, fills in struct instead.
213         (WebCore::RenderBox::computePositionedLogicalHeightUsing): Make const
214         and pass in a LogicalExtentComputedValues struct instead of 4 separate args for the results.
215         (WebCore::RenderBox::computePositionedLogicalHeightReplaced): Make const, fills in struct instead.
216         * rendering/RenderBox.h:
217         (WebCore::RenderBox::MarginsComputedValues::MarginsComputedValues):
218         (MarginsComputedValues): Struct of just margins.  Not used yet, but will be for
219         computeInlineDirectionMargins and computeBlockDirectionMargins.
220         (WebCore::RenderBox::LogicalExtentComputedValues::LogicalExtentComputedValues):
221         (LogicalExtentComputedValues): Struct to be used by computeLogical{Width,Height}. Only used by
222         computeLogicalHeight so far.
223
224 2012-08-27  Rob Buis  <rbuis@rim.com>
225
226         Fix compiler warnings in TextureMapperLayer.cpp
227         https://bugs.webkit.org/show_bug.cgi?id=95128
228
229         Reviewed by Noam Rosenthal.
230
231         Fix the warnings caused by -Wsign-compare.
232
233         * platform/graphics/texmap/TextureMapperLayer.cpp:
234         (WebCore::TextureMapperLayer::paintSelfAndChildren):
235         (WebCore::shouldKeepContentTexture):
236
237 2012-08-27  Adam Barth  <abarth@webkit.org>
238
239         [V8] Clean up reportFatalError in V8DOMWindowShell.cpp
240         https://bugs.webkit.org/show_bug.cgi?id=95124
241
242         Reviewed by Eric Seidel.
243
244         We don't need a PLATFORM(CHROMIUM) ifdef because MemoryUsageSupport has
245         a stub implementation on non-Chromium platforms. These comments are out
246         of date. We've been "temporarily" calling CRASH here for as long as the
247         bindings have existed and we don't plan to stop.
248
249         * bindings/v8/V8DOMWindowShell.cpp:
250         (WebCore::reportFatalError):
251
252 2012-08-27  Adam Barth  <abarth@webkit.org>
253
254         [V8] Clean up V8DOMWindowShell's reportUncaughtException
255         https://bugs.webkit.org/show_bug.cgi?id=95126
256
257         Reviewed by Eric Seidel.
258
259         This patch changes reportUncaughtException to operate in terms of a
260         DOMWindow rather than a Frame. In general, the bindings should use
261         DOMWindows rather than Frames because a DOMWindow is specific to a
262         given Document whereas a Frame displays many Documents over its
263         lifetime.
264
265         I've also updated some variable names to be more consistent with WebKit
266         naming conventions.
267
268         * bindings/v8/V8DOMWindowShell.cpp:
269         (WebCore::reportUncaughtException):
270
271 2012-08-27  Adam Barth  <abarth@webkit.org>
272
273         The static functions in V8DOMWindowShell.cpp are poorly named
274         https://bugs.webkit.org/show_bug.cgi?id=95122
275
276         Reviewed by Eric Seidel.
277
278         This patch cleans up the naming of the static functions in
279         V8DOMWindowShell.cpp.
280
281         I've inlined handleFatalErrorInV8 into its one caller.
282
283         * bindings/v8/V8DOMWindowShell.cpp:
284         (WebCore::reportFatalError):
285             - Removed V8 from the name becaues this entire file is about V8.
286         (WebCore::reportUncaughtException):
287             - Ditto.
288         (WebCore::findFrame):
289             - Remove the "get" prefix because it's a weak verb.
290         (WebCore::reportUnsafeJavaScriptAccess):
291         (WebCore::initializeV8IfNeeded):
292         (WebCore::checkDocumentWrapper):
293             - Move this function up to the top of the file with the rest of the
294               static functions.
295         (WebCore):
296
297 2012-08-27  Adam Barth  <abarth@webkit.org>
298
299         [V8] initContextIfNeeded is overly specific
300         https://bugs.webkit.org/show_bug.cgi?id=95120
301
302         Reviewed by Eric Seidel.
303
304         This patch is part of a series to clean up V8DOMWindowShell.  This
305         patch renames initContextIfNeeded to initializeIfNeeded because callers
306         shouldn't need to worry about what V8DOMWindow needs to initialize.
307
308         * bindings/scripts/CodeGeneratorV8.pm:
309         (GenerateToV8Converters):
310         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
311         (WebCore::V8TestActiveDOMObject::wrapSlow):
312         * bindings/v8/ScriptController.cpp:
313         (WebCore::ScriptController::evaluateInIsolatedWorld):
314         (WebCore::ScriptController::mainWorldContext):
315         (WebCore::ScriptController::matchesCurrentContext):
316         * bindings/v8/V8DOMWindowShell.cpp:
317         (WebCore::V8DOMWindowShell::initializeIfNeeded):
318         (WebCore::V8DOMWindowShell::updateDocument):
319         (WebCore::V8DOMWindowShell::namedItemAdded):
320         (WebCore::V8DOMWindowShell::namedItemRemoved):
321         * bindings/v8/V8DOMWindowShell.h:
322         (V8DOMWindowShell):
323         * bindings/v8/WorkerContextExecutionProxy.cpp:
324         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
325         (WebCore::WorkerContextExecutionProxy::evaluate):
326         * bindings/v8/WorkerContextExecutionProxy.h:
327         (WorkerContextExecutionProxy):
328
329 2012-08-27  Brian Salomon  <bsalomon@google.com>
330
331         [Skia/Chromium] Remove use of deprecated Skia names
332         https://bugs.webkit.org/show_bug.cgi?id=95108
333
334         Reviewed by Eric Seidel.
335
336         kSkia8888_PM_GrPixelConfig has been deprecated in favor of kSkia8888_GrPixelConfig.
337         SkGrTexturePixelRef has been deprecated in favor of SkGrPixelRef.
338
339         Covered by existing tests (image filter and canvas tests).
340
341         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
342         (WebCore::createAcceleratedCanvas):
343         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
344         * platform/graphics/skia/ImageBufferSkia.cpp:
345         (WebCore::createAcceleratedCanvas):
346
347 2012-08-27  Adrienne Walker  <enne@google.com>
348
349         [chromium] Unreviewed, remove OVERRIDE from non-virtual function.
350         https://bugs.webkit.org/show_bug.cgi?id=94859
351
352         Unreviewed build fix.
353
354         * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.h:
355         (CCScrollbarGeometryFixedThumb):
356
357 2012-08-27  Adrienne Walker  <enne@google.com>
358
359         [chromium] Prevent scrollbar thumb size from changing during compositor zoom
360         https://bugs.webkit.org/show_bug.cgi?id=94859
361
362         Reviewed by James Robinson.
363
364         During a pinch zoom, the total size of a scrollable area will change,
365         causing the thumb to become a different size. This will cause the
366         thumb texture (painted at a specific size) to stretch. To fix this,
367         add a new CCScrollbarGeometryFixedThumb class which behaves just like
368         a normal WebScrollbarThemeGeometry class, but constrains the thumb to
369         be a fixed size.
370
371         * WebCore.gypi:
372         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
373         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
374         * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.cpp: Added.
375         (WebCore):
376         (WebCore::CCScrollbarGeometryFixedThumb::create):
377         (WebCore::CCScrollbarGeometryFixedThumb::~CCScrollbarGeometryFixedThumb):
378         (WebCore::CCScrollbarGeometryFixedThumb::update):
379         (WebCore::CCScrollbarGeometryFixedThumb::clone):
380         (WebCore::CCScrollbarGeometryFixedThumb::thumbLength):
381         (WebCore::CCScrollbarGeometryFixedThumb::thumbPosition):
382         (WebCore::CCScrollbarGeometryFixedThumb::splitTrack):
383         (WebCore::CCScrollbarGeometryFixedThumb::CCScrollbarGeometryFixedThumb):
384         * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.h: Added.
385         (WebCore):
386         (CCScrollbarGeometryFixedThumb):
387         * platform/graphics/chromium/cc/CCScrollbarGeometryStub.cpp: Added.
388         (WebCore):
389         (WebCore::CCScrollbarGeometryStub::CCScrollbarGeometryStub):
390         (WebCore::CCScrollbarGeometryStub::~CCScrollbarGeometryStub):
391         (WebCore::CCScrollbarGeometryStub::clone):
392         (WebCore::CCScrollbarGeometryStub::thumbPosition):
393         (WebCore::CCScrollbarGeometryStub::thumbLength):
394         (WebCore::CCScrollbarGeometryStub::trackPosition):
395         (WebCore::CCScrollbarGeometryStub::trackLength):
396         (WebCore::CCScrollbarGeometryStub::hasButtons):
397         (WebCore::CCScrollbarGeometryStub::hasThumb):
398         (WebCore::CCScrollbarGeometryStub::trackRect):
399         (WebCore::CCScrollbarGeometryStub::thumbRect):
400         (WebCore::CCScrollbarGeometryStub::minimumThumbLength):
401         (WebCore::CCScrollbarGeometryStub::scrollbarThickness):
402         (WebCore::CCScrollbarGeometryStub::backButtonStartRect):
403         (WebCore::CCScrollbarGeometryStub::backButtonEndRect):
404         (WebCore::CCScrollbarGeometryStub::forwardButtonStartRect):
405         (WebCore::CCScrollbarGeometryStub::forwardButtonEndRect):
406         (WebCore::CCScrollbarGeometryStub::constrainTrackRectToTrackPieces):
407         (WebCore::CCScrollbarGeometryStub::splitTrack):
408         * platform/graphics/chromium/cc/CCScrollbarGeometryStub.h: Added.
409         (WebCore):
410         (CCScrollbarGeometryStub):
411         (WebCore::CCScrollbarGeometryStub::update):
412         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
413         (WebCore::CCScrollbarLayerImpl::setScrollbarGeometry):
414         (WebCore::CCScrollbarLayerImpl::setScrollbarData):
415         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
416         (WebCore::CCScrollbarLayerImpl::scrollbarGeometry):
417         (CCScrollbarLayerImpl):
418
419 2012-08-27  Dana Jansens  <danakj@chromium.org>
420
421         [chromium] Have RenderSurface create and add its own generated RenderPass
422         https://bugs.webkit.org/show_bug.cgi?id=94957
423
424         Reviewed by Adrienne Walker.
425
426         Have CCRenderSurface create and add its RenderPass to the appropriate
427         data structures. Previously CCLayerTreeHostImpl had this responsibility
428         but this limits us to a single RenderPass per RenderSurface. In ubercomp
429         we have layers that generate many RenderPasses that all contribute to a
430         single RenderSurface. This target RenderSurface can create all the needed
431         RenderPasses in the correct order for itself when asked to now.
432
433         We invent CCRenderPassSink and make FrameData implement it, so that the
434         RenderSurface does not need to know the details of how the RenderPasses
435         it generates will be stored.
436
437         Test: CCRenderSurfaceTest.sanityCheckSurfaceCreatesCorrectRenderPass
438
439         * WebCore.gypi:
440         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
441         (WebCore::CCLayerTreeHostImpl::FrameData::appendRenderPass):
442         (WebCore):
443         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
444         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
445         (FrameData):
446         * platform/graphics/chromium/cc/CCRenderPassSink.h: Added.
447         (WebCore):
448         (CCRenderPassSink):
449         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
450         (WebCore::CCRenderSurface::appendRenderPasses):
451         (WebCore):
452         * platform/graphics/chromium/cc/CCRenderSurface.h:
453         (WebCore):
454         (CCRenderSurface):
455
456 2012-08-27  Takashi Sakamoto  <tasak@google.com>
457
458         ShadowRoot insertion point change aborts css transition
459         https://bugs.webkit.org/show_bug.cgi?id=93755
460
461         Reviewed by Hajime Morita.
462
463         ElementShadow always detaches shadow hosts when distribution is
464         changed, i.e. select attribute's value is changed. However it clears
465         the style of the shadow host. So when distribution is changed,
466         no css transition can be started at the same time. To avoid this
467         problem, invalidateDistribution, i.e. a method for invalidating current
468         distribution, should not make shadow host reattach. Instead, it should
469         make distribute nodes reattached and set needsRecalcStyle flag of
470         shadow host.
471
472         Test: transitions/transition-on-shadow-host-with-distributed-node.html
473
474         * dom/ElementShadow.cpp:
475         (WebCore::ElementShadow::addShadowRoot):
476         To support replaced elements, i.e. IMG, and so on, shadow host's
477         renderer must be updated when author shadow roots are addded.
478         So invoke shadow host's reattach instead of shadowRoot's attach.
479         (WebCore::ElementShadow::invalidateDistribution):
480         Remove shadow host's lazy reattach (detach and lazyAttach). Instead, do
481         distributed nodes' lazy reattach and set shadow host's needsRecalcStyle
482         flag.
483         * dom/Node.h:
484         (WebCore::Node::lazyReattach):
485         Newly added. The method works like Node::reattach, but use
486         lazyAttach instead of attach.
487         (WebCore):
488
489 2012-08-27  Justin Novosad  <junov@chromium.org>
490
491         [Chromium] Fixing infinite recursion in Canvas2DLayerManager
492         https://bugs.webkit.org/show_bug.cgi?id=95110
493
494         Reviewed by Stephen White.
495
496         Fixed infinite recursion by not reporting a change in memory allocation
497         when Canvas2DLayerBridge::freeMemoryIfPossible fails to free memory.
498         Also modified Canvas2DLayerManager::layerAllocatedStorageChanged to
499         only initiate a memory eviction pass if memory consumption has
500         increased.
501
502         Test: webkit_unit_tests Canvas2DLayerManagerTest*
503
504         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
505         (WebCore::Canvas2DLayerBridge::freeMemoryIfPossible):
506         * platform/graphics/chromium/Canvas2DLayerManager.cpp:
507         (WebCore::Canvas2DLayerManager::layerAllocatedStorageChanged):
508
509 2012-08-27  Anna Cavender  <annacc@chromium.org>
510
511         TextTrack modes are strings
512         https://bugs.webkit.org/show_bug.cgi?id=85050
513
514         Reviewed by Eric Carlson.
515
516         The spec recently changed away from enumeration to string for the type
517         of TextTrack mode.
518         http://dev.w3.org/html5/spec/media-elements.html#texttrackmode
519
520         No new tests. Updates to existing tests.
521
522         * html/HTMLMediaElement.cpp:
523
524         Use the new string mode rather than the old enum.  Also, TextTrack::setMode()
525         no longer requires an ExceptionCode:
526         (WebCore::HTMLMediaElement::loadInternal):
527         (WebCore::HTMLMediaElement::textTrackModeChanged):
528         (WebCore::HTMLMediaElement::textTrackKindChanged):
529         (WebCore::HTMLMediaElement::addTextTrack):
530         (WebCore::HTMLMediaElement::showingTrackWithSameKind):
531         (WebCore::HTMLMediaElement::configureTextTrackGroup):
532         (WebCore::HTMLMediaElement::configureNewTextTracks):
533         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
534
535         * html/track/TextTrack.cpp:
536
537         Update these methods to use ConstructFromLiteral for efficiency:
538         (WebCore::TextTrack::subtitlesKeyword):
539         (WebCore::TextTrack::captionsKeyword):
540         (WebCore::TextTrack::descriptionsKeyword):
541         (WebCore::TextTrack::chaptersKeyword):
542         (WebCore::TextTrack::metadataKeyword):
543
544         New methods to use for the mode string (replacing the enum):
545         (WebCore::TextTrack::disabledKeyword):
546         (WebCore::TextTrack::hiddenKeyword):
547         (WebCore::TextTrack::showingKeyword):
548
549         (WebCore::TextTrack::TextTrack): Initialize mode to disabled.
550         (WebCore::TextTrack::setMode): Remove ExceptionCode and no longer throw an
551         INVALID_ACCESS_ERR.
552         (WebCore::TextTrack::mode): Return a keyword string instead of an enum.
553
554         Use the new string mode rather than the old enum:
555         (WebCore::TextTrack::cues):
556         (WebCore::TextTrack::activeCues):
557         (WebCore::TextTrack::isRendered):
558
559         * html/track/TextTrack.h: Remove old enum, add new string keyword methods,
560         and update mode() and setMode() accordingly.
561
562         * html/track/TextTrack.idl: Remove old enum and make mode attribute be a string.
563
564         Use the new string mode rather than the old enum:
565         * html/track/TextTrackCue.cpp:
566         (WebCore::TextTrackCue::dispatchEvent):
567         (WebCore::TextTrackCue::isActive):
568
569 2012-08-27  Mike West  <mkwst@chromium.org>
570
571         'self' in a CSP directive should match blob: and filesystem: URLs.
572         https://bugs.webkit.org/show_bug.cgi?id=94918
573
574         Reviewed by Adam Barth.
575
576         'blob:' and 'filesystem:' URLs are same-origin with the page on which
577         they were created. Currently, we're using the wrong URL for comparison
578         when matching against CSP directive source lists. This patch adjusts the
579         matching logic to compare against the blob's inner URL, rather than
580         directly against the blob itself.
581
582         Tests: http/tests/security/contentSecurityPolicy/blob-urls-match-self.html
583                http/tests/security/contentSecurityPolicy/filesystem-urls-match-self.html
584                http/tests/security/contentSecurityPolicy/source-list-parsing-08.html
585
586         * page/ContentSecurityPolicy.cpp:
587         (WebCore::CSPSourceList::matches):
588             If we should use the inner URL of a given resource, extract it into
589             a local variable, and pass that into CSPSource for comparison.
590         * page/SecurityOrigin.cpp:
591         (WebCore::SecurityOrigin::shouldUseInnerURL):
592         (WebCore::SecurityOrigin::extractInnerURL):
593             Move shouldUseInnerURL and extractInnerURL to SecurityOrigin's
594             public signature.
595         (WebCore::shouldTreatAsUniqueOrigin):
596         (WebCore::SecurityOrigin::create):
597         (WebCore::SecurityOrigin::isSecure):
598             shouldUseInnerURL and extractInnerURL are now static methods of
599             SecurityOrigin: updating calls to mathc.
600         * page/SecurityOrigin.h:
601
602 2012-08-27  Kevin Funk  <kevin.funk@kdab.com>
603
604         Fix compilation when both OS(WINCE) and PLATFORM(QT) are true
605         https://bugs.webkit.org/show_bug.cgi?id=95050
606
607         Reviewed by Simon Hausmann.
608
609         The compilation of NativeImagePtr.h breaks when both OS(WINCE) and PLATFORM(QT) are enabled.
610         This patch fixes this.
611
612         * platform/graphics/NativeImagePtr.h:
613
614 2012-08-27  Tommy Widenflycht  <tommyw@google.com>
615
616         MediaStream API: Fix review comments from patch #93119
617         https://bugs.webkit.org/show_bug.cgi?id=95064
618
619         Reviewed by Adam Barth.
620
621         Adding const to accessors.
622
623         Change covered by exisiting tests..
624
625         * Modules/mediastream/RTCIceCandidate.cpp:
626         (WebCore::RTCIceCandidate::candidate):
627         (WebCore::RTCIceCandidate::sdpMid):
628         (WebCore::RTCIceCandidate::sdpMLineIndex):
629         * Modules/mediastream/RTCIceCandidate.h:
630         (RTCIceCandidate):
631         * Modules/mediastream/RTCSessionDescription.cpp:
632         (WebCore::RTCSessionDescription::create):
633         (WebCore::RTCSessionDescription::type):
634         (WebCore::RTCSessionDescription::sdp):
635         * Modules/mediastream/RTCSessionDescription.h:
636         (RTCSessionDescription):
637
638 2012-08-27  Simon Fraser  <simon.fraser@apple.com>
639
640         Make Force Repaint work with tiled backing store
641         https://bugs.webkit.org/show_bug.cgi?id=95102
642
643         Reviewed by Dan Bernstein.
644
645         forceRepaint() didn't work correctly with tiled backing
646         store, because it never actually caused a repaint on the tiles.
647
648         Fix by having the drawing area call forceRepaint() on
649         the TileCache (via the TiledBacking interface), which
650         just ends up as a setNeedsDisplay().
651
652         * WebCore.xcodeproj/project.pbxproj:
653         * platform/graphics/TiledBacking.h:
654         * platform/graphics/ca/mac/TileCache.h:
655         * platform/graphics/ca/mac/TileCache.mm:
656         (WebCore::TileCache::forceRepaint):
657
658 2012-08-27  Victor Carbune  <victor@rosedu.org>
659
660         Crash when trying to render empty cues
661         https://bugs.webkit.org/show_bug.cgi?id=94776
662
663         Reviewed by Eric Carlson.
664
665         Added extra safety checks.
666
667         Test: media/track/track-cue-rendering-empty-cue-crash.html
668
669         * html/track/TextTrackCue.cpp:
670         (WebCore::TextTrackCue::getCueAsHTML):
671         (WebCore::TextTrackCue::updateDisplayTree):
672
673 2012-08-24  Simon Fraser  <simon.fraser@apple.com>
674
675         Implement sticky positioning
676         https://bugs.webkit.org/show_bug.cgi?id=90046
677
678         Reviewed by Ojan Vafai.
679
680         Initial implementation of position: -webkit-sticky, which 
681         constrains an element to be positioned inside the intersection
682         of its container box, and the viewport. Sticky elements create
683         stacking context.
684         
685         A stickily positioned element behaves like position:relative
686         (space is reserved for it in-flow), but with an offset that is
687         determined by the sticky position. Changed isInFlowPositioned()
688         to cover relative and sticky.
689         
690         Added a convenience isPositioned() to RenderObject(), which
691         is true for an object with any non-static position value.
692         
693         Tests: fast/css/sticky/inflow-sticky.html
694                fast/css/sticky/inline-sticky-abspos-child.html
695                fast/css/sticky/inline-sticky.html
696                fast/css/sticky/replaced-sticky.html
697                fast/css/sticky/sticky-as-positioning-container.html
698                fast/css/sticky/sticky-left-percentage.html
699                fast/css/sticky/sticky-left.html
700                fast/css/sticky/sticky-margins.html
701                fast/css/sticky/sticky-side-margins.html
702                fast/css/sticky/sticky-stacking-context.html
703                fast/css/sticky/sticky-top-margins.html
704                fast/css/sticky/sticky-top.html
705                fast/css/sticky/sticky-writing-mode-horizontal-bt.html
706                fast/css/sticky/sticky-writing-mode-vertical-lr.html
707                fast/css/sticky/sticky-writing-mode-vertical-rl.html
708
709         * css/StyleResolver.cpp:
710         (WebCore::StyleResolver::adjustRenderStyle): Have position:sticky
711         create stacking context from the get-go, to make scrolling optimizations easier later.
712         * page/FrameView.cpp:
713         (WebCore::FrameView::scrollContentsFastPath): Use hasViewportConstrainedPosition().
714         * page/FrameView.h: FrameView's "fixed" objects contains both fixed and sticky objects now.
715         * rendering/RenderBlock.cpp: Use isPositioned().
716         (WebCore::RenderBlock::isSelectionRoot):
717         (WebCore::RenderBlock::renderName):
718         * rendering/RenderBox.cpp:
719         (WebCore::RenderBox::styleWillChange): Need to look for both stick and fixed positioning to
720         determine whether to add something to FrameView's fixed object set.
721         (WebCore::RenderBox::computeRectForRepaint): Need to take the sticky offset into account
722         when computing repaint rects.
723         * rendering/RenderBox.h: Implement frameRectForStickyPositioning() for boxes.
724         * rendering/RenderBoxModelObject.cpp:
725         (WebCore::RenderBoxModelObject::updateBoxModelInfoFromStyle):
726         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
727         (WebCore::RenderBoxModelObject::stickyPositionOffset): Compute the sticky position
728         offset by taking into account the viewport rect, and the conteriner's contentRect
729         inset by its margins.
730         (WebCore::RenderBoxModelObject::offsetForInFlowPosition): Convenience wrapper
731         for getting relative or sticky offset.
732         * rendering/RenderBoxModelObject.h: Have requiresLayer() use isPositioned().
733         (WebCore::RenderBoxModelObject::stickyPositionLogicalOffset):
734         * rendering/RenderInline.cpp:
735         (WebCore::RenderInline::styleWillChange): Need to implement this to 
736         add/remove objects from FrameView's fixed object list, since, prior to sticky,
737         only boxes could be fixed.
738         (WebCore::RenderInline::renderName):
739         (WebCore::RenderInline::positionForPoint):
740         (WebCore::RenderInline::computeRectForRepaint):
741         * rendering/RenderInline.h:
742         * rendering/RenderLayer.cpp:
743         (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Have to look for fixed or sticky.
744         (WebCore::RenderLayer::calculateClipRects): Use isPositioned().
745         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
746         * rendering/RenderLayer.h:
747         * rendering/RenderObject.cpp:
748         (WebCore::RenderObject::styleWillChange):
749         (WebCore::RenderObject::propagateStyleToAnonymousChildren): Should use isInFlowPositioned(),
750         not just isRelPositioned().
751         (WebCore::RenderObject::offsetParent): Use isPositioned().
752         * rendering/RenderObject.h:
753         (WebCore::RenderObject::isInFlowPositioned):
754         (WebCore::RenderObject::isStickyPositioned):
755         (WebCore::RenderObject::setStickyPositioned):
756         (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields):
757         (RenderObjectBitfields):
758         * rendering/RenderStyle.h: add hasViewportConstrainedPosition() for fixed or sticky position.
759
760 2012-08-27  Julien Chaffraix  <jchaffraix@webkit.org>
761
762         Unreviewed Mac Chromium build fix after r126763.
763
764         * platform/graphics/Font.cpp:
765
766 2012-08-25  Antonio Gomes  <agomes@rim.com>
767
768         For convenience, make RenderLayer::enclosingElement a public method.
769         https://bugs.webkit.org/show_bug.cgi?id=95018
770
771         Reviewed by George Staikos.
772
773         ... this way some platform specific code could make use of it
774         and remove code duplications.
775
776         No new tests needed.
777
778         * rendering/RenderLayer.h:
779         (RenderLayer):
780
781 2012-08-27  Andrey Kosyakov  <caseq@chromium.org>
782
783         Web Inspector: display a dimmed warning icon on a timeline record if it has children with warning
784         https://bugs.webkit.org/show_bug.cgi?id=95087
785
786         Reviewed by Yury Semikhatsky.
787
788         Propagate warning from child timeline records to the top, display a dimmed warning icons for records
789         that have children with warnings.
790
791         * inspector/front-end/TimelinePanel.js:
792         (WebInspector.TimelineRecordListRow.prototype.update):
793         * inspector/front-end/TimelinePresentationModel.js:
794         (WebInspector.TimelinePresentationModel.Record):
795         (WebInspector.TimelinePresentationModel.Record.prototype.get aggregatedStats):
796         (WebInspector.TimelinePresentationModel.Record.prototype.setHasWarning):
797         * inspector/front-end/timelinePanel.css:
798         (.timeline-tree-item.child-warning::after):
799
800 2012-08-27  Vsevolod Vlasov  <vsevik@chromium.org>
801
802         Web Inspector: Debugger should break on failed assertions in Break on exceptions mode.
803         https://bugs.webkit.org/show_bug.cgi?id=95088
804
805         Reviewed by Yury Semikhatsky.
806
807         Debugger now breaks when assert message is added to console from console API.
808
809         Test: inspector/debugger/debugger-pause-on-failed-assertion.html
810
811         * English.lproj/localizedStrings.js:
812         * inspector/Inspector.json:
813         * inspector/InspectorDebuggerAgent.cpp:
814         (WebCore::InspectorDebuggerAgent::addMessageToConsole):
815         (WebCore):
816         * inspector/InspectorDebuggerAgent.h:
817         (InspectorDebuggerAgent):
818         * inspector/InspectorInstrumentation.cpp:
819         (WebCore):
820         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
821         * inspector/front-end/DebuggerModel.js:
822         * inspector/front-end/ScriptsPanel.js:
823
824 2012-08-27  Ned Holbrook  <nholbrook@apple.com>
825
826         Improve line breaking performance for complex text
827         https://bugs.webkit.org/show_bug.cgi?id=83045
828
829         Reviewed by Darin Adler.
830
831         Currently RenderBlock::LineBreaker::nextLineBreak assumes that measuring individual words is as cheap
832         as free. This is not the case when dealing with complex text, which benefits from laying out as much
833         text as possible and by reusing that layout when feasible: by doing so this patch improves line
834         breaking by 25% as measured with a simple test app.
835
836         The bulk of this change is modifying ComplexTextController::advance, which previously required the
837         text offset to be strictly increasing and assumed unidirectional text; now it supports random seeking
838         in a naive fashion (by restarting to the beginning) and traverses glyphs in logical order. In the
839         latter case, the presence of any non-LTR runs triggers the population of a mapping from logical to
840         visual run indices. Finally, a new flag has been added which inhibits glyph advances from being split
841         across ligatures (thus causing spurious line breaks).
842
843         A ComplexTextController and its associated TextRun and Font are encapsulated in a TextLayout object,
844         which is instantiated as an opaque object via functions that are no-ops unless building for Mac. A
845         static member function (isNeeded) checks to see whether a TextRun is complex, in order to avoid
846         needless instantiation. It also bails if tabs would be enabled since positional effects are not yet
847         handled in this mode.
848
849         No behavioral changes are expected due to this change, so no new tests.
850
851         * platform/graphics/Font.cpp:
852         (WTF): Define deleteOwnedPtr for TextLayout as calling through destroyLayout; relying on operator delete is not workable as the class does not exist on all platforms.
853         (WTF::WebCore::TextLayout):
854         (WebCore): Implement no-op TextLayout wrappers for non-Mac platforms.
855         (WebCore::Font::createLayout):
856         (WebCore::Font::deleteLayout):
857         (WebCore::Font::width):
858         * platform/graphics/Font.h:
859         (WebCore): Add forward declarations for RenderText and TextLayout.
860         (Font): Add functions for dealing with pointer to TextLayout implementation.
861         (WTF): Declare deleteOwnedPtr for TextLayout.
862         * platform/graphics/mac/ComplexTextController.cpp:
863         (TextLayout): An instance of this class corresponds to a ComplexTextController for a particular TextRun.
864         (WebCore::TextLayout::isNeeded): Used by wrapper to avoid instantiation when complex layout is not required.
865         (WebCore::TextLayout::TextLayout):
866         (WebCore::TextLayout::width):
867         (WebCore::TextLayout::fontWithNoWordSpacing): Helper function to allow initialization of member variable.
868         (WebCore::TextLayout::constructTextRun): Ditto.
869         (WebCore): Implement real TextLayout wrappers for Mac.
870         (WebCore::Font::createLayout):
871         (WebCore::Font::deleteLayout):
872         (WebCore::Font::width):
873         (WebCore::ComplexTextController::ComplexTextController): Initialize m_ltrOnly and reserve initial capacity for m_runIndices.
874         (WebCore::ComplexTextController::indexOfCurrentRun): Return (visual) m_complexTextRuns index corresponding to (logical) m_currentRun, lazily constructing m_runIndices if needed.
875         (WebCore::ComplexTextController::incrementCurrentRun): Return next m_complexTextRuns index in logical order.
876         (WebCore::ComplexTextController::advance): Allow restarting, support for bidi reordering, and option to measure only whole glyphs rather than dividing advances.
877         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Clear m_ltrOnly on detecting a RTL run.
878         * platform/graphics/mac/ComplexTextController.h:
879         (ComplexTextController): Add m_ltrOnly indicating no bidi reordering, and m_runIndices mapping from runs (logical order) to m_complexTextRuns (visual order).
880         (WebCore::ComplexTextController::ComplexTextRun::indexBegin):
881         (WebCore::ComplexTextController::ComplexTextRun::isLTR):
882         (ComplexTextRun): Add helper functions returning values pertinent to individual runs as opposed to the entire containing line.
883         (WebCore::ComplexTextController::stringBegin): Return first string index.
884         (WebCore::ComplexTextController::stringEnd): Return one past last string index.
885         * platform/graphics/mac/ComplexTextControllerCoreText.mm: Initialize m_indexBegin and m_ltr.
886         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Initialize m_indexBegin and m_ltr.
887         * rendering/RenderBlock.h:
888         (RenderTextInfo): Add single mapping from RenderText to LazyLineBreakIterator and (possibly null) TextLayout since they are recreated under the same circumstances.
889         * rendering/RenderBlockLineLayout.cpp:
890         (WebCore::RenderBlock::RenderTextInfo::RenderTextInfo): Make non-inline to avoid compilation errors.
891         (WebCore::RenderBlock::RenderTextInfo::~RenderTextInfo): Ditto.
892         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Allow RenderTextInfo to be reused across calls to nextLineBreak.
893         (WebCore::textWidth): Use TextLayout when supplied for measuring.
894         (WebCore::RenderBlock::LineBreaker::nextLineBreak):
895
896 2012-08-27  Nico Weber  <thakis@chromium.org>
897
898         Add two missing variable initializers to RenderFlowThread
899         https://bugs.webkit.org/show_bug.cgi?id=95048
900
901         Reviewed by Julien Chaffraix.
902
903         The m_dispatchRegionLayoutUpdateEvent change is needed to fix this
904         valgrind warning:
905         Conditional jump or move depends on uninitialised value(s)
906           WebCore::RenderFlowThread::layout() (third_party/WebKit/Source/WebCore/rendering/RenderFlowThread.cpp:189)
907           WebCore::RenderObject::layoutIfNeeded() (third_party/WebKit/Source/WebCore/rendering/RenderObject.h:647)
908           WebCore::FlowThreadController::layoutRenderNamedFlowThreads() (third_party/WebKit/Source/WebCore/rendering/FlowThreadController.cpp:124)
909           WebCore::RenderView::layout() (third_party/WebKit/Source/WebCore/rendering/RenderView.cpp:159)
910           WebCore::FrameView::layout(bool) (third_party/WebKit/Source/WebCore/page/FrameView.cpp:1154)
911           WebCore::FrameView::layoutTimerFired(WebCore::Timer<WebCore::FrameView>*) (third_party/WebKit/Source/WebCore/page/FrameView.cpp:2074)
912           WebCore::Timer<WebCore::FrameView>::fired() (third_party/WebKit/Source/WebCore/platform/Timer.h:100)
913           WebCore::ThreadTimers::sharedTimerFiredInternal() (third_party/WebKit/Source/WebCore/platform/ThreadTimers.cpp:115)
914           WebCore::ThreadTimers::sharedTimerFired() (third_party/WebKit/Source/WebCore/platform/ThreadTimers.cpp:93)
915           webkit_glue::WebKitPlatformSupportImpl::DoTimeout() (./webkit/glue/webkitplatformsupport_impl.h:163)
916         The report came from the `fast/regions/absolute-pos-elem-in-named-flow.html'--pixel-test` test.
917
918         m_dispatchRegionLayoutUpdateEvent was added in https://bugs.webkit.org/show_bug.cgi?id=88778
919         by abucur, reviewed by abarth.
920
921         While here, also initialize m_hasRegionsWithStyling, added in https://bugs.webkit.org/show_bug.cgi?id=85633
922         by mihnea, reviewed by hyatt.
923
924         * rendering/RenderFlowThread.cpp:
925         (WebCore::RenderFlowThread::RenderFlowThread):
926
927 2012-08-27  Justin Novosad  <junov@chromium.org>
928
929         [Chromium] Implementing a global limit on memory consumed by deferred 2D canvases
930         https://bugs.webkit.org/show_bug.cgi?id=94386
931
932         Reviewed by Stephen White.
933
934         Before this change, there was no global bound on memory that could be
935         consumed for the purpose of recording 2d canvas deferred draw commands.
936         There was only a per canvas limit. It is possible for canvases to get
937         dereferenced without flushing pending draw commands, which may lock
938         resources until the canvas element is garbage collected. This makes
939         it possible to grow memory consumption indefinitely by hitting reload
940         successively on some canvas-intensive web pages.
941
942         The solution implemented in this change consists in maintaining a
943         global registry of deferred canvas layers and tracking the sum of
944         memory allocated by all canvases for the purpose of storing deferred
945         draw commands. When memory consumption reaches the allowed limit,
946         caches are cleared and draw operations are flushed on one or several
947         canvases, starting with the least recently used, until memory
948         consumption is below a target level.
949
950         New tests: webkit_unit_tests DeferredLayerManagerTest*
951
952         * WebCore.gypi:
953         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
954         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
955         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
956         (WebCore::Canvas2DLayerBridge::storageAllocatedForRecordingChanged):
957         Overloaded from SkDeferredCanvas::NotificationClient. Called when
958         there is a change in the number of bytes allocated by the deferred
959         canvas.
960         (WebCore):
961         (WebCore::Canvas2DLayerBridge::flushedDrawCommands):
962         Overloaded from SkDeferredCanvas::NotificationClient. Called when
963         pending draw commands are flush by the deferred canvas.
964         (WebCore::Canvas2DLayerBridge::freeMemoryIfPossible):
965         Called by the Canvas2DLayerManager to request the release of unlocked
966         memory resources (caches). Request is relayed to SkDeferredCanvas.
967         returns number of bytes freed.
968         (WebCore::Canvas2DLayerBridge::flush):
969         Requests that pending draw commands be flushed immediately from the
970         deferred canvas queue. Request is relayed to SkDeferredCanvas.
971         (WebCore::Canvas2DLayerBridge::contextAcquired):
972         * platform/graphics/chromium/Canvas2DLayerBridge.h:
973         (Canvas2DLayerBridge):
974         (WebCore::Canvas2DLayerBridge::bytesAllocated):
975         (WebCore::Canvas2DLayerBridge::updateBytesAllocated):
976         * platform/graphics/chromium/Canvas2DLayerManager.cpp: Added.
977         (WebCore):
978         (WebCore::Canvas2DLayerManager::Canvas2DLayerManager):
979         (WebCore::Canvas2DLayerManager::~Canvas2DLayerManager):
980         (WebCore::Canvas2DLayerManager::init):
981         Sets the global limit for the maximum total number of bytes allocated
982         by deferred layers.
983         (WebCore::Canvas2DLayerManager::get):
984         Singleton accessor
985         (WebCore::Canvas2DLayerManager::layerDidDraw):
986         Called by Canvas2DLayerBridge to indicate that the layer was drawn to.
987         (WebCore::Canvas2DLayerManager::addLayerToList):
988         (WebCore::Canvas2DLayerManager::layerAllocatedStorageChanged):
989         Called by Canvas2DLayerBridge to indicate thet the memory consumed by
990         the layer has changed.
991         (WebCore::Canvas2DLayerManager::layerDidFlush):
992         Called by Canvas2DLayerBridge to indicated that the pending draw
993         commands of the layer were flushed.
994         (WebCore::Canvas2DLayerManager::layerToBeDestroyed):
995         Called by Canvas2DLayerBridge upon destruction.
996         (WebCore::Canvas2DLayerManager::freeMemoryIfNecessary):
997         Called internally. Check that current memory consumption is below
998         the tolerated limit.  If check fails, intiates resource releases.
999         (WebCore::Canvas2DLayerManager::removeLayerFromList):
1000         (WebCore::Canvas2DLayerManager::isInList):
1001         (WebCore::Canvas2DLayerManager::updateBytesAllocated):
1002         * platform/graphics/chromium/Canvas2DLayerManager.h: Added.
1003         (WebCore):
1004         (Canvas2DLayerManager):
1005
1006 2012-08-27  Zeno Albisser  <zeno@webkit.org>
1007
1008         Implement GraphicsSurface::paintToTextureMapper.
1009         https://bugs.webkit.org/show_bug.cgi?id=95077
1010
1011         Forward paintToTextureMapper call directly into
1012         GraphicsSurface. This allows getting rid of platform
1013         specific code in TextureMapperSurfaceBackingStore.
1014
1015         Reviewed by Noam Rosenthal.
1016
1017         * platform/graphics/surfaces/GraphicsSurface.cpp:
1018         (WebCore::GraphicsSurface::paintToTextureMapper):
1019         (WebCore):
1020         * platform/graphics/surfaces/GraphicsSurface.h:
1021         (WebCore):
1022         (GraphicsSurface):
1023         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1024         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1025         (WebCore):
1026         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
1027         (WebCore):
1028         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1029         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1030         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
1031
1032 2012-08-27  Ilya Tikhonovsky  <loislo@chromium.org>
1033
1034         Web Inspector: filter out weak references from retainers tree
1035         https://bugs.webkit.org/show_bug.cgi?id=95082
1036
1037         Reviewed by Yury Semikhatsky.
1038
1039         Weak references don't retain objects.
1040
1041         * inspector/front-end/HeapSnapshotGridNodes.js:
1042
1043 2012-08-27  Philippe Normand  <pnormand@igalia.com>
1044
1045         [GStreamer][Qt] WebAudio support
1046         https://bugs.webkit.org/show_bug.cgi?id=94806
1047
1048         Reviewed by Simon Hausmann.
1049
1050         Build fix after r126756 in which I forgot to add the new
1051         AudioBusQt.cpp file.
1052
1053         * platform/audio/qt/AudioBusQt.cpp: Added.
1054         (WebCore):
1055         (WebCore::AudioBus::loadPlatformResource):
1056
1057 2012-08-27  Philippe Normand  <pnormand@igalia.com>
1058
1059         [GStreamer][Qt] WebAudio support
1060         https://bugs.webkit.org/show_bug.cgi?id=94806
1061
1062         Reviewed by Simon Hausmann.
1063
1064         Build system changes to support WebAudio and its GStreamer
1065         backend. A new AudioBusQt implementation is also needed to locate
1066         and load local .wav files. Note: WebAudio is still disabled by default in
1067         build-webkit. Use --web-audio to explicitely enable it at build time.
1068
1069         * DerivedSources.pri:
1070         * Target.pri:
1071         * WebCore.pri:
1072         * WebCore.qrc:
1073         * platform/audio/HRTFElevation.cpp:
1074         (WebCore): Use concatenated HRTF impulse response for increased
1075         performance, just like GTK, Mac and EFL ports.
1076         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp: Undef the
1077         signals macro so gio.h can be properly included.
1078         * platform/audio/qt/AudioBusQt.cpp: Added.
1079         (WebCore):
1080         (WebCore::AudioBus::loadPlatformResource):
1081
1082 2012-08-27  Andreas Kling  <kling@webkit.org>
1083
1084         REGRESSION(r126524): Heap-buffer-overflow in WebCore::StylePropertySet::copyPropertiesFrom
1085         <http://webkit.org/b/95005>
1086
1087         Reviewed by Antti Koivisto.
1088
1089         Remove incorrect assertion that the StylePropertySet is empty before properties are copied
1090         into it, as this is no guarantee in editing code.
1091         This regressed when splitting the code into mutable/immutable paths. Covered by assertions
1092         on existing tests.
1093
1094         * css/StylePropertySet.cpp:
1095         (WebCore::StylePropertySet::copyPropertiesFrom):
1096
1097 2012-08-25  Andrey Kosyakov  <caseq@chromium.org>
1098
1099         Web Inspector: display cause for style recalculation and layout on Timeline
1100         https://bugs.webkit.org/show_bug.cgi?id=95000
1101
1102         Reviewed by Pavel Feldman.
1103
1104         Added instrumentation for didInvalidateLayout and didScheduleStyleRecalculation;
1105         Dispaly stacks of the above records in Layout and Recalculate Style as "call site" stacks (need a better wording?);
1106         Display synchronous Layout records in red, provide a warning that these may affect performance;
1107
1108         * English.lproj/localizedStrings.js: +"Note" and a warning test for sync layout;
1109         * inspector/InspectorInstrumentation.cpp: Plumbing new instrumentation methods through to timeline;
1110         (WebCore):
1111         (WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
1112         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
1113         * inspector/InspectorInstrumentation.h: ditto.
1114         (InspectorInstrumentation):
1115         (WebCore::InspectorInstrumentation::didInvalidateLayout):
1116         (WebCore):
1117         * inspector/InspectorTimelineAgent.cpp: ditto.
1118         (TimelineRecordType):
1119         (WebCore::InspectorTimelineAgent::didInvalidateLayout):
1120         (WebCore):
1121         (WebCore::InspectorTimelineAgent::didScheduleStyleRecalculation):
1122         * inspector/InspectorTimelineAgent.h: ditto.
1123         (InspectorTimelineAgent):
1124         * inspector/front-end/TimelineModel.js:
1125         * inspector/front-end/TimelinePanel.js:
1126         (WebInspector.TimelineRecordListRow.prototype.update): Display records with warnings in their own style;
1127         * inspector/front-end/TimelinePresentationModel.js:
1128         (WebInspector.TimelinePresentationModel._initRecordStyles): Renamed, added new records;
1129         (WebInspector.TimelinePresentationModel.recordStyle): Added new records;
1130         (WebInspector.TimelinePresentationModel.prototype.reset):
1131         (WebInspector.TimelinePresentationModel.prototype._innerAddRecord): Add support for new records, make 'em hidden;
1132         (WebInspector.TimelinePresentationModel.Record): Add support for hidden records;
1133         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
1134         (WebInspector.TimelinePresentationModel.Record.prototype._linkifyTopCallFrame): Linkify originator's top frame if no own stack is present;
1135         * inspector/front-end/timelinePanel.css:
1136         (.timeline-tree-item.warning): Reddish text for records with warnings;
1137         * page/FrameView.cpp:
1138         (WebCore::FrameView::scheduleRelayout): Added call to InspectorInstrumentation::didInvalidateLayout()
1139         (WebCore::FrameView::scheduleRelayoutOfSubtree): Ditto.
1140
1141 2012-08-27  KyungTae Kim  <ktf.kim@samsung.com>
1142
1143         [EFL] Wrong button height on CSS tests
1144         https://bugs.webkit.org/show_bug.cgi?id=85494
1145
1146         Reviewed by Gyuyoung Kim.
1147         
1148         The codes for overriding styles for buttons must be removed 
1149         for passing the layout test 'fast/css/button-height.html'.
1150         
1151         The 'resetBorder' reset border style for a button (2px outset) to the initial value, 
1152         and it makes the size of <input type=button> different from the size of <button>.
1153         ('fast/css/button-height.html' checks whether they are same.)
1154         
1155         The 'setWhiteSpace' is not needed because the white space already set to 'PRE'.
1156         
1157         The 'setHeight' reset the 'height' style that should not be reset.
1158         ('fast/css/buttons-height.html' set the button's height style.)
1159         
1160         Tests : fast/css/button-height.html  
1161                 fast/css/continuationCrash.html  
1162                 fast/css/margin-top-bottom-dynamic.html  
1163                 fast/css/rtl-ordering.html  
1164                 fast/dom/HTMLTextAreaElement/reset-textarea.html  
1165                 fast/forms/basic-buttons.html  
1166                 fast/forms/blankbuttons.html  
1167                 fast/forms/box-shadow-override.html  
1168                 fast/forms/button-positioned.html  
1169                 fast/forms/button-sizes.html  
1170                 fast/forms/button-style-color.html  
1171                 fast/forms/button-table-styles.html  
1172                 fast/forms/button-text-transform.html  
1173                 fast/forms/control-restrict-line-height.html  
1174                 fast/forms/file/file-input-direction.html  
1175                 fast/forms/file/file-input-disabled.html  
1176                 fast/forms/formmove3.html  
1177                 fast/forms/input-appearance-height.html  
1178                 fast/forms/input-button-sizes.html  
1179                 fast/forms/input-value.html  
1180                 fast/forms/targeted-frame-submission.html  
1181                 fast/html/details-replace-summary-child.html  
1182                 fast/html/details-replace-text.html  
1183                 fast/overflow/scroll-nested-positioned-layer-in-overflow.html  
1184                 fast/overflow/scrollRevealButton.html  
1185                 fast/replaced/replaced-breaking.html  
1186                 fast/replaced/width100percent-button.html  
1187                 fast/text/textIteratorNilRenderer.html  
1188   
1189         * platform/efl/RenderThemeEfl.cpp:  
1190         (WebCore::RenderThemeEfl::adjustButtonStyle): No longer override CSS properties for button styling.
1191
1192 2012-08-27  Alexander Pavlov  <apavlov@chromium.org>
1193
1194         Web Inspector: DOM tree search issue with quotation marks
1195         https://bugs.webkit.org/show_bug.cgi?id=95065
1196
1197         Reviewed by Pavel Feldman.
1198
1199         Introduced the exact match mode for attributes (query enclosed in double quotes) where only entire attribute values
1200         are matched against the search query (with the double quotes trimmed).
1201
1202         * inspector/InspectorDOMAgent.cpp:
1203         (WebCore::InspectorDOMAgent::performSearch):
1204
1205 2012-08-27  Andrey Adaikin  <aandrey@chromium.org>
1206
1207         Web Inspector: [WebGL] Implement serializing WebGL state and replaying it later
1208         https://bugs.webkit.org/show_bug.cgi?id=94933
1209
1210         Reviewed by Pavel Feldman.
1211
1212         This will allow us to save the WebGL state at any arbitrary point in order to replay a trace log later on another canvas.
1213         Main points of the change:
1214         - Allow every Resource and Call instances be serialized to a Replayable, and resurrected back during a replay on another canvas.
1215
1216         - Before executing an original WebGL call and saving it to a trace log, first serialize all the Resources that will be involved in
1217           this call, if they are not yet serialized. The latter part is implemented with a Cache instance, checking that we convert a Resource
1218           to a Replayable only once: the first time it was used in the trace log being collected. We do not need to serialize the subsequent
1219           changes to this Resource's state (if any), since they will be saved in the trace log being collected and replayed automatically.
1220
1221         - Some information about the WebGL state may be requested in the runtime (e.g. with the gl.getParameter method). We use this wherever
1222           possible instead of collecting Calls in a Resource log. Otherwise, we have to collect WebGL calls (like gl.texImage2D) in order to
1223           replay them later.
1224
1225         - Later the Replayable objects hierarchy (the TraceLog) may be serialized further for cross-device transmission, for example.
1226         
1227
1228         * inspector/InjectedScriptWebGLModuleSource.js:
1229         (.):
1230
1231 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1232
1233         Unreviewed, rolling out r126694 and r126731.
1234         http://trac.webkit.org/changeset/126694
1235         http://trac.webkit.org/changeset/126731
1236         https://bugs.webkit.org/show_bug.cgi?id=95069
1237
1238         Causes all pages to be rendered as a completely black page in
1239         Qt WebKit2 (Requested by carewolf on #webkit).
1240
1241         * platform/graphics/GraphicsContext3D.h:
1242         * platform/graphics/texmap/TextureMapperGL.cpp:
1243         (SharedGLData):
1244         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
1245         (WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
1246         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
1247         (WebCore::TextureMapperGLData::sharedGLData):
1248         (WebCore::TextureMapperGLData::TextureMapperGLData):
1249         (TextureMapperGLData):
1250         (WebCore::scissorClip):
1251         (WebCore::TextureMapperGL::ClipStack::apply):
1252         (WebCore::TextureMapperGLData::initializeStencil):
1253         (WebCore::TextureMapperGL::TextureMapperGL):
1254         (WebCore::TextureMapperGL::beginPainting):
1255         (WebCore::TextureMapperGL::endPainting):
1256         (WebCore::TextureMapperGL::drawQuad):
1257         (WebCore::TextureMapperGL::drawBorder):
1258         (WebCore):
1259         (WebCore::TextureMapperGL::drawTextureRectangleARB):
1260         (WebCore::TextureMapperGL::drawTexture):
1261         (WebCore::viewportMatrix):
1262         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
1263         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1264         (WebCore::BitmapTextureGL::didReset):
1265         (WebCore::BitmapTextureGL::updateContents):
1266         (WebCore::TextureMapperGL::drawFiltered):
1267         (WebCore::BitmapTextureGL::initializeStencil):
1268         (WebCore::BitmapTextureGL::clearIfNeeded):
1269         (WebCore::BitmapTextureGL::createFboIfNeeded):
1270         (WebCore::BitmapTextureGL::bind):
1271         (WebCore::BitmapTextureGL::~BitmapTextureGL):
1272         (WebCore::TextureMapperGL::bindDefaultSurface):
1273         (WebCore::TextureMapperGL::beginScissorClip):
1274         (WebCore::TextureMapperGL::beginClip):
1275         (WebCore::TextureMapperGL::endClip):
1276         (WebCore::TextureMapperGL::createTexture):
1277         * platform/graphics/texmap/TextureMapperGL.h:
1278         (TextureMapperGL):
1279         (ClipStack):
1280         (WebCore::BitmapTextureGL::textureTarget):
1281         (BitmapTextureGL):
1282         (WebCore::BitmapTextureGL::BitmapTextureGL):
1283         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1284         (WebCore):
1285         (WebCore::TextureMapperShaderManager::getShaderProgram):
1286         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
1287         (WebCore::TextureMapperShaderProgram::initializeProgram):
1288         (WebCore::TextureMapperShaderProgram::getUniformLocation):
1289         (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
1290         (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple):
1291         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
1292         (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple):
1293         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
1294         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask):
1295         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::TextureMapperShaderProgramAntialiasingNoMask):
1296         (WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
1297         (WebCore::StandardFilterProgram::~StandardFilterProgram):
1298         (WebCore::StandardFilterProgram::StandardFilterProgram):
1299         (WebCore::StandardFilterProgram::create):
1300         (WebCore::StandardFilterProgram::prepare):
1301         (WebCore::TextureMapperShaderManager::getShaderForFilter):
1302         * platform/graphics/texmap/TextureMapperShaderManager.h:
1303         (WebCore::TextureMapperShaderProgram::id):
1304         (WebCore::TextureMapperShaderProgram::vertexAttrib):
1305         (TextureMapperShaderProgram):
1306         (WebCore::TextureMapperShaderProgram::matrixLocation):
1307         (WebCore::TextureMapperShaderProgram::flipLocation):
1308         (WebCore::TextureMapperShaderProgram::textureSizeLocation):
1309         (WebCore::TextureMapperShaderProgram::sourceTextureLocation):
1310         (WebCore::TextureMapperShaderProgram::maskTextureLocation):
1311         (WebCore::TextureMapperShaderProgram::opacityLocation):
1312         (WebCore::TextureMapperShaderProgram::isValidUniformLocation):
1313         (StandardFilterProgram):
1314         (WebCore::StandardFilterProgram::vertexAttrib):
1315         (WebCore::StandardFilterProgram::texCoordAttrib):
1316         (WebCore::StandardFilterProgram::textureUniform):
1317         (WebCore::TextureMapperShaderProgramSimple::create):
1318         (TextureMapperShaderProgramSimple):
1319         (WebCore::TextureMapperShaderProgramRectSimple::create):
1320         (WebCore::TextureMapperShaderProgramOpacityAndMask::create):
1321         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::create):
1322         (WebCore::TextureMapperShaderProgramSolidColor::create):
1323         (WebCore::TextureMapperShaderProgramSolidColor::colorLocation):
1324         (TextureMapperShaderProgramSolidColor):
1325         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::create):
1326         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadVerticesInTextureCoordinatesLocation):
1327         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadEdgesInScreenSpaceLocation):
1328         (TextureMapperShaderProgramAntialiasingNoMask):
1329
1330 2012-08-27  Ilya Tikhonovsky  <loislo@chromium.org>
1331
1332         Web Inspector: HeapSnapshot: filter weak links in markQueriableHeapObjects and two other minor fixes.
1333         https://bugs.webkit.org/show_bug.cgi?id=95068
1334
1335         Reviewed by Yury Semikhatsky.
1336
1337         - count shortcuts as normal links in distance;
1338         shortcuts help us to show object properties without exposing internal scope object
1339         - set initial distance to 1 instead of 0
1340         the initial value for window was 0 and bfs counted the window object as not visited.
1341
1342         * inspector/front-end/HeapSnapshot.js:
1343         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
1344         (WebInspector.HeapSnapshot.prototype._bfs):
1345         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
1346
1347 2012-08-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1348
1349         Unreviewed, rolling out r126694 and r126731.
1350         http://trac.webkit.org/changeset/126694
1351         http://trac.webkit.org/changeset/126731
1352         https://bugs.webkit.org/show_bug.cgi?id=95069
1353
1354         Causes all pages to be rendered as a completely black page in
1355         Qt WebKit2 (Requested by carewolf on #webkit).
1356
1357         * platform/graphics/GraphicsContext3D.h:
1358         * platform/graphics/texmap/TextureMapperGL.cpp:
1359         (SharedGLData):
1360         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
1361         (WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
1362         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
1363         (WebCore::TextureMapperGLData::sharedGLData):
1364         (WebCore::TextureMapperGLData::TextureMapperGLData):
1365         (TextureMapperGLData):
1366         (WebCore::scissorClip):
1367         (WebCore::TextureMapperGL::ClipStack::apply):
1368         (WebCore::TextureMapperGLData::initializeStencil):
1369         (WebCore::TextureMapperGL::TextureMapperGL):
1370         (WebCore::TextureMapperGL::beginPainting):
1371         (WebCore::TextureMapperGL::endPainting):
1372         (WebCore::TextureMapperGL::drawQuad):
1373         (WebCore::TextureMapperGL::drawBorder):
1374         (WebCore):
1375         (WebCore::TextureMapperGL::drawTextureRectangleARB):
1376         (WebCore::TextureMapperGL::drawTexture):
1377         (WebCore::viewportMatrix):
1378         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
1379         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1380         (WebCore::BitmapTextureGL::didReset):
1381         (WebCore::BitmapTextureGL::updateContents):
1382         (WebCore::TextureMapperGL::drawFiltered):
1383         (WebCore::BitmapTextureGL::initializeStencil):
1384         (WebCore::BitmapTextureGL::clearIfNeeded):
1385         (WebCore::BitmapTextureGL::createFboIfNeeded):
1386         (WebCore::BitmapTextureGL::bind):
1387         (WebCore::BitmapTextureGL::~BitmapTextureGL):
1388         (WebCore::TextureMapperGL::bindDefaultSurface):
1389         (WebCore::TextureMapperGL::beginScissorClip):
1390         (WebCore::TextureMapperGL::beginClip):
1391         (WebCore::TextureMapperGL::endClip):
1392         (WebCore::TextureMapperGL::createTexture):
1393         * platform/graphics/texmap/TextureMapperGL.h:
1394         (TextureMapperGL):
1395         (ClipStack):
1396         (WebCore::BitmapTextureGL::textureTarget):
1397         (BitmapTextureGL):
1398         (WebCore::BitmapTextureGL::BitmapTextureGL):
1399         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1400         (WebCore):
1401         (WebCore::TextureMapperShaderManager::getShaderProgram):
1402         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
1403         (WebCore::TextureMapperShaderProgram::initializeProgram):
1404         (WebCore::TextureMapperShaderProgram::getUniformLocation):
1405         (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
1406         (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple):
1407         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
1408         (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple):
1409         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
1410         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask):
1411         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::TextureMapperShaderProgramAntialiasingNoMask):
1412         (WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
1413         (WebCore::StandardFilterProgram::~StandardFilterProgram):
1414         (WebCore::StandardFilterProgram::StandardFilterProgram):
1415         (WebCore::StandardFilterProgram::create):
1416         (WebCore::StandardFilterProgram::prepare):
1417         (WebCore::TextureMapperShaderManager::getShaderForFilter):
1418         * platform/graphics/texmap/TextureMapperShaderManager.h:
1419         (WebCore::TextureMapperShaderProgram::id):
1420         (WebCore::TextureMapperShaderProgram::vertexAttrib):
1421         (TextureMapperShaderProgram):
1422         (WebCore::TextureMapperShaderProgram::matrixLocation):
1423         (WebCore::TextureMapperShaderProgram::flipLocation):
1424         (WebCore::TextureMapperShaderProgram::textureSizeLocation):
1425         (WebCore::TextureMapperShaderProgram::sourceTextureLocation):
1426         (WebCore::TextureMapperShaderProgram::maskTextureLocation):
1427         (WebCore::TextureMapperShaderProgram::opacityLocation):
1428         (WebCore::TextureMapperShaderProgram::isValidUniformLocation):
1429         (StandardFilterProgram):
1430         (WebCore::StandardFilterProgram::vertexAttrib):
1431         (WebCore::StandardFilterProgram::texCoordAttrib):
1432         (WebCore::StandardFilterProgram::textureUniform):
1433         (WebCore::TextureMapperShaderProgramSimple::create):
1434         (TextureMapperShaderProgramSimple):
1435         (WebCore::TextureMapperShaderProgramRectSimple::create):
1436         (WebCore::TextureMapperShaderProgramOpacityAndMask::create):
1437         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::create):
1438         (WebCore::TextureMapperShaderProgramSolidColor::create):
1439         (WebCore::TextureMapperShaderProgramSolidColor::colorLocation):
1440         (TextureMapperShaderProgramSolidColor):
1441         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::create):
1442         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadVerticesInTextureCoordinatesLocation):
1443         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadEdgesInScreenSpaceLocation):
1444         (TextureMapperShaderProgramAntialiasingNoMask):
1445
1446 2012-08-27  Christophe Dumez  <christophe.dumez@intel.com>
1447
1448         Regression(r126721): bindings-tests results need to be updated
1449         https://bugs.webkit.org/show_bug.cgi?id=95060
1450
1451         Reviewed by Kentaro Hara.
1452
1453         Regenerate bindings-tests results after r126721. This change
1454         removed the NULL checks from visitChildren functions.
1455
1456         * bindings/scripts/test/JS/JSTestObj.cpp:
1457         (WebCore::JSTestObj::visitChildren):
1458         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1459         (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
1460
1461 2012-08-24  Alexander Pavlov  <apavlov@chromium.org>
1462
1463         Web Inspector: Incorrect property override computation when !important is involved
1464         https://bugs.webkit.org/show_bug.cgi?id=94923
1465
1466         Reviewed by Vsevolod Vlasov.
1467
1468         The cascade of !important properties was totally wrong if a property was listed as !important first and as non-!important later on.
1469
1470         * inspector/front-end/StylesSidebarPane.js:
1471         (WebInspector.StylesSidebarPane.prototype._refreshStyleRules):
1472         (WebInspector.StylesSidebarPane.prototype._markUsedProperties):
1473
1474 2012-08-27  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1475
1476         Rename RegisterProtocolHandler API to NavigatorContentUtils
1477         https://bugs.webkit.org/show_bug.cgi?id=94920
1478
1479         Reviewed by Adam Barth.
1480
1481         Renaming whatever RegisterProtocolHandler-prefixed to NavigatorContentUtils-prefixed.
1482         Module 'protocolhandler' is renamed to 'navigatorcontentutils'.
1483
1484         No new tests as there is no new functionality.
1485
1486         * CMakeLists.txt:
1487         * Configurations/FeatureDefines.xcconfig:
1488         * GNUmakefile.am:
1489         * GNUmakefile.features.am:
1490         * GNUmakefile.list.am:
1491         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: Renamed from Source/WebCore/Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp.
1492         (WebCore):
1493         (WebCore::initProtocolHandlerWhitelist):
1494         (WebCore::verifyCustomHandlerURL):
1495         (WebCore::isProtocolWhitelisted):
1496         (WebCore::verifyProtocolHandlerScheme):
1497         (WebCore::NavigatorContentUtils::from):
1498         (WebCore::NavigatorContentUtils::~NavigatorContentUtils):
1499         (WebCore::NavigatorContentUtils::create):
1500         (WebCore::NavigatorContentUtils::registerProtocolHandler):
1501         (WebCore::customHandlersStateString):
1502         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
1503         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
1504         (WebCore::NavigatorContentUtils::supplementName):
1505         (WebCore::provideNavigatorContentUtilsTo):
1506         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Renamed from Source/WebCore/Modules/protocolhandler/NavigatorRegisterProtocolHandler.h.
1507         (WebCore):
1508         (NavigatorContentUtils):
1509         (WebCore::NavigatorContentUtils::NavigatorContentUtils):
1510         (WebCore::NavigatorContentUtils::client):
1511         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Renamed from Source/WebCore/Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl.
1512         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h: Renamed from Source/WebCore/Modules/protocolhandler/RegisterProtocolHandlerClient.h.
1513         (WebCore):
1514         (NavigatorContentUtilsClient):
1515         (WebCore::NavigatorContentUtilsClient::~NavigatorContentUtilsClient):
1516         * Target.pri:
1517         * WebCore.gyp/WebCore.gyp:
1518         * WebCore.gypi:
1519         * WebCore.pri:
1520         * WebCore.vcproj/WebCore.vcproj:
1521         * WebCore.vcproj/WebCoreCommon.vsprops:
1522         * WebCore.vcproj/copyForwardingHeaders.cmd:
1523
1524 2012-08-27  Simon Hausmann  <simon.hausmann@nokia.com>
1525
1526         [Qt] REGRESSION(r126694): It broke the debug build
1527         https://bugs.webkit.org/show_bug.cgi?id=95037
1528
1529         Unreviewed trivial build fix for debug builds.
1530
1531         Don't pass WTFStrings through printf, use .ascii().data().
1532
1533         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1534         (WebCore::StandardFilterProgram::StandardFilterProgram):
1535
1536 2012-08-26  Yoshifumi Inoue  <yosin@chromium.org>
1537
1538         [Forms] Focus style of millisecond field in multiple fields time input UI is different from other fields
1539         https://bugs.webkit.org/show_bug.cgi?id=95046
1540
1541         Reviewed by Kent Tamura.
1542
1543         This patch fixes typo for input::-webkit-datetime-edit-millisecond-field:focus
1544         selector to make all fields of multiple fields time input UI have same
1545         style on focus.
1546
1547         Test: fast/forms/time-multiple-fields/time-multiple-fields-focus-style.html
1548
1549         * css/html.css: Fix typo for selector input::-webkit-datetime-edit-millisecond-field:focus
1550
1551 2012-08-26  Nico Weber  <thakis@chromium.org>
1552
1553         Initialized m_hasNonEmptyList to fix a valgrind uninitialized read
1554         https://bugs.webkit.org/show_bug.cgi?id=95045
1555
1556         Reviewed by Kent Tamura.
1557
1558         Conditional jump or move depends on uninitialised value(s)
1559         WebCore::HTMLInputElement::dataList() const (third_party/WebKit/Source/WebCore/html/HTMLInputElement.cpp:1523)
1560         WebCore::RangeInputType::updateTickMarkValues() (third_party/WebKit/Source/WebCore/html/RangeInputType.cpp:351)
1561         WebCore::RangeInputType::findClosestTickMarkValue(WebCore::Decimal const&) (third_party/WebKit/Source/WebCore/html/RangeInputType.cpp:370)
1562         WebCore::HTMLInputElement::findClosestTickMarkValue(WebCore::Decimal const&) (third_party/WebKit/Source/WebCore/html/HTMLInputElement.cpp:324)
1563         WebCore::SliderThumbElement::setPositionFromPoint(WebCore::FractionalLayoutPoint const&) (third_party/WebKit/Source/WebCore/html/shadow/SliderThumbElement.cpp:296)
1564         WebCore::SliderThumbElement::dragFrom(WebCore::FractionalLayoutPoint const&) (third_party/WebKit/Source/WebCore/html/shadow/SliderThumbElement.cpp:246)
1565         WebCore::RangeInputType::handleMouseDownEvent(WebCore::MouseEvent*) (third_party/WebKit/Source/WebCore/html/RangeInputType.cpp:159)
1566         WebCore::HTMLInputElement::defaultEventHandler(WebCore::Event*) (third_party/WebKit/Source/WebCore/html/HTMLInputElement.cpp:1163)
1567         WebCore::MediaControlTimelineElement::defaultEventHandler(WebCore::Event*) (third_party/WebKit/Source/WebCore/html/shadow/MediaControlElements.cpp:916)
1568         WebCore::EventDispatcher::dispatchEventPostProcess(WTF::PassRefPtr<WebCore::Event>, void*) (third_party/WebKit/Source/WebCore/dom/EventDispatcher.cpp:357)
1569         WebCore::EventDispatcher::dispatchEvent(WTF::PassRefPtr<WebCore::Event>) (third_party/WebKit/Source/WebCore/dom/EventDispatcher.cpp:263)
1570         WebCore::MouseEventDispatchMediator::dispatchEvent(WebCore::EventDispatcher*) const (third_party/WebKit/Source/WebCore/dom/MouseEvent.cpp:238)
1571         WebCore::EventDispatcher::dispatchEvent(WebCore::Node*, WTF::PassRefPtr<WebCore::EventDispatchMediator>) (third_party/WebKit/Source/WebCore/dom/EventDispatcher.cpp:129)
1572         ...
1573         The report came from the `media/audio-delete-while-slider-thumb-clicked.html'--pixel-test` test.
1574
1575         * html/HTMLInputElement.cpp:
1576         (WebCore::HTMLInputElement::HTMLInputElement):
1577         (WebCore::HTMLInputElement::dataList):
1578
1579 2012-08-26  Geoffrey Garen  <ggaren@apple.com>
1580
1581         Removed the NULL checks from visitChildren functions
1582         https://bugs.webkit.org/show_bug.cgi?id=95021
1583
1584         Reviewed by Oliver Hunt.
1585
1586         As of http://trac.webkit.org/changeset/126624, all values are NULL-checked
1587         during GC, so explicit NULL checks aren't needed anymore.
1588
1589 2012-08-26  Geoffrey Garen  <ggaren@apple.com>
1590
1591         Removed a JSC-specific hack from the web inspector
1592         https://bugs.webkit.org/show_bug.cgi?id=95033
1593
1594         Reviewed by Filip Pizlo.
1595
1596         The hack was never reviewed. If it had been, I suspect it would have
1597         gotten an r- for making weird assumptions about the engine's implimentation.
1598
1599         * inspector/InjectedScriptSource.js: It's not sound to assume that an
1600         object has no properties except for "arguments" if and only if it's an
1601         activation: non-activations can have a property named "arguments", and
1602         activations can optimize out "arguments".
1603
1604 2012-08-26  Christopher Cameron  <ccameron@chromium.org>
1605
1606         [chromium] Fix a bug where CCThreadProxy::canDraw() gets stuck at false on tab switch
1607         https://bugs.webkit.org/show_bug.cgi?id=94903
1608
1609         Reviewed by James Robinson.
1610
1611         Suppose the impl thread deletes all textures via
1612         releaseContentsTextures().  The impl thread will not be able to draw
1613         again until resetContentsTexturesPurged() is called in
1614         scheduledActionCommit().  When deleting the textures, the function
1615         releaseContentsTextures() calls setNeedsCommitOnImplThread() to ensure
1616         that a commit will come along to allow drawing again.  If this commit
1617         is aborted, then the page will not draw until a commit is scheduled,
1618         which may be never.
1619
1620         Make beginFrameAborted() call setNeedsCommit(), so that the requested
1621         commit will eventually occur.
1622
1623         No new tests, update to CCSchedulerStateMachineTest's 
1624         TestGoesInvisibleBeforeBeginFrameCompletes to require new
1625         functionality (new test fails with old behavior).
1626
1627         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
1628         (WebCore::CCSchedulerStateMachine::beginFrameAborted):
1629
1630 2012-08-26  Antti Koivisto  <antti@apple.com>
1631
1632         Remove parent pointer from StyleSheetContents and StyleRuleImport
1633         https://bugs.webkit.org/show_bug.cgi?id=94926
1634
1635         Reviewed by Andreas Kling.
1636
1637         To be able to cache and share @imported stylesheets in the future there must not be any parent
1638         pointers in the stylesheet tree.
1639
1640         Parent pointers are used during loading to invoke load completion callbacks and for
1641         accessing document context information (like the security origin). They are not used after
1642         the sheet load is complete. Instead of keeping the parent pointers around indefinitely as part of the 
1643         stylesheet data structure we just keep a pointer to the root CSSStyleSheet for the duration of the load.
1644         
1645         This patch doesn't enable any new caching or generally change the behavior.
1646
1647         * css/CSSStyleSheet.cpp:
1648         (WebCore::CSSStyleSheet::insertRule):
1649         (WebCore::CSSStyleSheet::rootStyleSheet):
1650         (WebCore):
1651         (WebCore::CSSStyleSheet::ownerDocument):
1652         * css/CSSStyleSheet.h:
1653         (CSSStyleSheet):
1654         * css/StyleRuleImport.cpp:
1655         (WebCore::StyleRuleImport::LoadContext::LoadContext):
1656         
1657             Simplify by making StyleRuleImport CachedStyleSheetClient directly. LoadContext contains
1658             fields that can be thrown away after load completes.
1659
1660         (WebCore):
1661         (WebCore::StyleRuleImport::StyleRuleImport):
1662         (WebCore::StyleRuleImport::~StyleRuleImport):
1663         (WebCore::StyleRuleImport::setCSSStyleSheet):
1664         (WebCore::StyleRuleImport::isLoading):
1665         (WebCore::StyleRuleImport::hadLoadError):
1666         (WebCore::StyleRuleImport::requestStyleSheet):
1667         * css/StyleRuleImport.h:
1668         (StyleRuleImport):
1669         (LoadContext):
1670         * css/StyleSheetContents.cpp:
1671         (WebCore::StyleSheetContents::StyleSheetContents):
1672         
1673             Remove now unnecessary constructor. 
1674
1675         (WebCore::StyleSheetContents::isCacheable):
1676         (WebCore::StyleSheetContents::parserAppendRule):
1677         (WebCore::StyleSheetContents::clearRules):
1678         (WebCore::StyleSheetContents::wrapperInsertRule):
1679         (WebCore::StyleSheetContents::wrapperDeleteRule):
1680         (WebCore::StyleSheetContents::requestImportedStyleSheets):
1681         (WebCore):
1682         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1683         (WebCore::StyleSheetContents::parseStringAtLine):
1684         (WebCore::StyleSheetContents::checkImportedSheetLoadCompleted):
1685         (WebCore::StyleSheetContents::checkLoadCompleted):
1686         (WebCore::StyleSheetContents::getAncestors):
1687         (WebCore::StyleSheetContents::hasImportCycle):
1688         
1689             Move the cycle checking to the root stylesheet so we don't need to pass the entire chain around.
1690             The extra work here is unlikely to cause problems, massive import trees don't really occur in
1691             practice.
1692
1693         * css/StyleSheetContents.h:
1694         (WebCore::StyleSheetContents::create):
1695         (StyleSheetContents):
1696         * dom/ProcessingInstruction.cpp:
1697         (WebCore::ProcessingInstruction::parseStyleSheet):
1698         * dom/StyleElement.cpp:
1699         (WebCore::StyleElement::createSheet):
1700         * html/HTMLLinkElement.cpp:
1701         (WebCore::HTMLLinkElement::setCSSStyleSheet):
1702
1703 2012-08-26  Andreas Kling  <kling@webkit.org>
1704
1705         Avoid pointless string/number round-trip in applyRelativeFontStyleChange().
1706         <http://webkit.org/b/95031>
1707
1708         Reviewed by Dan Bernstein.
1709
1710         Create a CSS_PX primitive value directly instead of passing String::number(foo) + "px" to the CSS parser.
1711
1712         * editing/ApplyStyleCommand.cpp:
1713         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1714
1715 2012-08-26  Gavin Peters  <gavinp@chromium.org>
1716
1717         Prerenderering should gracefully handle no PrerendererClient or PrerenderingPlatform being provided.
1718         https://bugs.webkit.org/show_bug.cgi?id=95036
1719
1720         Reviewed by Adam Barth.
1721
1722         Some assertions made sure there was a prerendering platform and client, and this change should make prerendering just be a NOP when no platform is provided, and just continue without a client when there is no client provided. These assertions were causing crashes in chromium's content_shell target, and really for no good reason.
1723
1724         No new tests, because DumpRenderTree provides both a PrerenderingPlatform and a PrerendererClient. But there is a new layout test in chromium's WebKitBrowserTest for this behaviour, see http://codereview.chromium.org/10869068/
1725
1726         * loader/Prerenderer.cpp:
1727         (WebCore::Prerenderer::Prerenderer):
1728         (WebCore::Prerenderer::render):
1729         (WebCore::Prerenderer::client):
1730         * loader/Prerenderer.h:
1731         * loader/PrerendererClient.cpp:
1732         (WebCore::PrerendererClient::from):
1733         * platform/chromium/Prerender.cpp:
1734         (WebCore::Prerender::cancel):
1735
1736 2012-08-26  David Barton  <dbarton@mathscribe.com>
1737
1738         Streamline mathml.css
1739         https://bugs.webkit.org/show_bug.cgi?id=95039
1740
1741         Reviewed by Dan Bernstein.
1742
1743         Remove 3 no-op { margin: 0px } declarations, and combine several { display: inline-block } ones.
1744
1745         Tested by existing tests.
1746
1747         * css/mathml.css:
1748         (math):
1749         (mo, mrow, mfenced, mfrac, msub, msup, msubsup, munder, mover, munderover, msqrt, mroot):
1750         (mrow, mfenced):
1751         (msubsup > *):
1752         (mo, mn, mi, mtext):
1753         (annotation, annotation-xml):
1754         (msqrt):
1755         (mroot):
1756
1757 2012-08-26  Pavel Feldman  <pfeldman@chromium.org>
1758
1759         Web Inspector: make ConsoleView listen to the JavaScriptContextManager
1760         https://bugs.webkit.org/show_bug.cgi?id=94940
1761
1762         Reviewed by Vsevolod Vlasov.
1763
1764         Otherwise, model is pushing data into the UI.
1765
1766         * inspector/front-end/ConsoleMessage.js:
1767         (WebInspector.ConsoleMessageImpl.prototype.clone):
1768         * inspector/front-end/ConsoleView.js:
1769         (WebInspector.ConsoleView.prototype._contextAdded):
1770         (WebInspector.ConsoleView.prototype._addContext):
1771         (WebInspector.ConsoleView.prototype._contextRemoved):
1772         * inspector/front-end/JavaScriptContextManager.js:
1773         (WebInspector.JavaScriptContextManager):
1774         (WebInspector.JavaScriptContextManager.prototype.contexts):
1775         (WebInspector.JavaScriptContextManager.prototype._frameAdded):
1776         (WebInspector.JavaScriptContextManager.prototype._frameDetached):
1777         * inspector/front-end/ParsedURL.js:
1778         (WebInspector.ParsedURL.completeURL):
1779         (WebInspector.TextEditorDelegateForSourceFrame.prototype.createLink):
1780         * inspector/front-end/inspector.js:
1781
1782 2012-08-26  Pavel Feldman  <pfeldman@chromium.org>
1783
1784         Web Inspector: provide "show function definition" and "reveal in elements panel" using context menu provider.
1785         https://bugs.webkit.org/show_bug.cgi?id=94932
1786
1787         Reviewed by Vsevolod Vlasov.
1788
1789         Moved corresponding context menu providers into scripts and elements panels.
1790
1791         * WebCore.gypi:
1792         * WebCore.vcproj/WebCore.vcproj:
1793         * inspector/compile-front-end.py:
1794         * inspector/front-end/ElementsPanel.js:
1795         (WebInspector.ElementsPanel.prototype.revealAndSelectNode):
1796         (WebInspector.ElementsPanel.prototype.appendApplicableItems.selectNode):
1797         (WebInspector.ElementsPanel.prototype.appendApplicableItems.revealElement):
1798         (WebInspector.ElementsPanel.prototype.appendApplicableItems):
1799         * inspector/front-end/ElementsPanelDescriptor.js: Copied from Source/WebCore/inspector/front-end/ScriptsPanelDescriptor.js.
1800         (WebInspector.ElementsPanelDescriptor):
1801         (WebInspector.ElementsPanelDescriptor.prototype.appendApplicableItems):
1802         * inspector/front-end/ObjectPropertiesSection.js:
1803         (WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
1804         (WebInspector.ObjectPropertyTreeElement.prototype.update):
1805         (WebInspector.ObjectPropertyTreeElement.prototype._contextMenuFired):
1806         * inspector/front-end/ScriptsPanel.js:
1807         (WebInspector.ScriptsPanel.prototype.appendApplicableItems):
1808         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
1809         (WebInspector.ScriptsPanel.prototype._appendFunctionItems.didGetDetails):
1810         (WebInspector.ScriptsPanel.prototype._appendFunctionItems.revealFunction):
1811         (WebInspector.ScriptsPanel.prototype._appendFunctionItems):
1812         * inspector/front-end/ScriptsPanelDescriptor.js:
1813         (WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
1814         * inspector/front-end/WebKit.qrc:
1815         * inspector/front-end/inspector.html:
1816         * inspector/front-end/inspector.js:
1817         (WebInspector._panelDescriptors):
1818
1819 2012-08-26  Joe Mason  <jmason@rim.com>
1820
1821         [BlackBerry] Stop leaking a pthread_attr in CookieDatabaseBackingStore
1822         https://bugs.webkit.org/show_bug.cgi?id=95029
1823
1824         Reviewed by Rob Buis.
1825
1826         No new tests (no behaviour change)
1827         RIM PR 198519
1828
1829         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
1830         (WebCore::CookieDatabaseBackingStore::CookieDatabaseBackingStore): use pthread_attr_default
1831         instead of pthread_attr_init
1832
1833 2012-08-25  David Barton  <dbarton@mathscribe.com>
1834
1835         Remove { vertical-align: baseline } declarations from mathml.css
1836         https://bugs.webkit.org/show_bug.cgi?id=95015
1837
1838         Reviewed by Eric Seidel.
1839
1840         The { vertical-align: baseline } declarations in mathml.css had no positive effect, and could
1841         wrongly override a previous { vertical-align: sub } or { vertical-align: super } declaration.
1842
1843         Added 1 test to mathml/presentation/subsup.xhtml.
1844
1845         * css/mathml.css:
1846         (math):
1847         (mrow, mfenced):
1848         (msub, msup):
1849         (msubsup):
1850         (munder, mover, munderover):
1851             - Remove { vertical-align: baseline } declarations
1852
1853 2012-08-25  Roland Takacs  <rtakacs@inf.u-szeged.hu>, Helder Correia  <helder.correia@nokia.com>
1854
1855         [Texmap] Move TextureMapperGL to use GraphicsContext3D
1856         https://bugs.webkit.org/show_bug.cgi?id=78672
1857
1858         Reviewed by Noam Rosenthal.
1859
1860         It is based on a previous patch by Helder Correia.
1861
1862         TextureMapperGL (TMGL) includes direct GL calls and
1863         GraphicsContext3D (GC3D) offers many conveniences over the
1864         former approach: using existing CSS shader code, ANGLE for
1865         shader compilation, reusing WebCore::Texture, having shaders and
1866         textures that can delete themselves.
1867
1868         A GC3D object is created by TMGL with the newly introduced
1869         builder createForCurrentGLContext(), which in turn uses
1870         the new RenderToCurrentGLContext flag underneath.
1871
1872         TMGL's dependency on OpenGLShims.h was completely removed.
1873         However, GC3D does not map every single GL constant. Thus, it's
1874         important to document the following:
1875             - GL_FALSE was mapped to false.
1876             - GL_UNPACK_ROW_LENGTH, GL_UNPACK_SKIP_PIXELS,
1877             GL_UNPACK_SKIP_ROWS, GL_TEXTURE_RECTANGLE_ARB, and
1878             GL_UNSIGNED_INT_8_8_8_8_REV were locally defined in TMGL.
1879
1880         The patch was originally developed by Helder Correia and finished
1881         by Roland Takacs.
1882
1883         No new tests, refactoring.
1884
1885         * platform/graphics/GraphicsContext3D.h:
1886         * platform/graphics/texmap/TextureMapperGL.cpp:
1887         (SharedGLData):
1888         (WebCore::TextureMapperGLData::SharedGLData::currentSharedGLData):
1889         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
1890         (WebCore::TextureMapperGLData::sharedGLData):
1891         (WebCore::TextureMapperGLData::TextureMapperGLData):
1892         (TextureMapperGLData):
1893         (WebCore::scissorClip):
1894         (WebCore::TextureMapperGL::ClipStack::apply):
1895         (WebCore::TextureMapperGLData::initializeStencil):
1896         (WebCore::TextureMapperGL::TextureMapperGL):
1897         (WebCore::TextureMapperGL::beginPainting):
1898         (WebCore::TextureMapperGL::endPainting):
1899         (WebCore::TextureMapperGL::drawQuad):
1900         (WebCore::TextureMapperGL::drawBorder):
1901         (WebCore):
1902         (WebCore::TextureMapperGL::drawTextureRectangleARB):
1903         (WebCore::TextureMapperGL::drawTexture):
1904         (WebCore::viewportMatrix):
1905         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
1906         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
1907         (WebCore::BitmapTextureGL::didReset):
1908         (WebCore::BitmapTextureGL::updateContents):
1909         (WebCore::TextureMapperGL::drawFiltered):
1910         (WebCore::BitmapTextureGL::initializeStencil):
1911         (WebCore::BitmapTextureGL::clearIfNeeded):
1912         (WebCore::BitmapTextureGL::createFboIfNeeded):
1913         (WebCore::BitmapTextureGL::bind):
1914         (WebCore::BitmapTextureGL::~BitmapTextureGL):
1915         (WebCore::TextureMapperGL::bindDefaultSurface):
1916         (WebCore::TextureMapperGL::beginScissorClip):
1917         (WebCore::TextureMapperGL::beginClip):
1918         (WebCore::TextureMapperGL::endClip):
1919         (WebCore::TextureMapperGL::createTexture):
1920         * platform/graphics/texmap/TextureMapperGL.h:
1921         (WebCore::TextureMapperGL::graphicsContext3D):
1922         (TextureMapperGL):
1923         (ClipStack):
1924         (WebCore::BitmapTextureGL::textureTarget):
1925         (BitmapTextureGL):
1926         (WebCore::BitmapTextureGL::BitmapTextureGL):
1927         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1928         (WebCore):
1929         (WebCore::TextureMapperShaderManager::getShaderProgram):
1930         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
1931         (WebCore::TextureMapperShaderProgram::initializeProgram):
1932         (WebCore::TextureMapperShaderProgram::getUniformLocation):
1933         (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
1934         (WebCore::TextureMapperShaderProgramSimple::TextureMapperShaderProgramSimple):
1935         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
1936         (WebCore::TextureMapperShaderProgramRectSimple::TextureMapperShaderProgramRectSimple):
1937         (WebCore::TextureMapperShaderProgramOpacityAndMask::TextureMapperShaderProgramOpacityAndMask):
1938         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::TextureMapperShaderProgramRectOpacityAndMask):
1939         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::TextureMapperShaderProgramAntialiasingNoMask):
1940         (WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
1941         (WebCore::StandardFilterProgram::~StandardFilterProgram):
1942         (WebCore::StandardFilterProgram::StandardFilterProgram):
1943         (WebCore::StandardFilterProgram::create):
1944         (WebCore::StandardFilterProgram::prepare):
1945         (WebCore::TextureMapperShaderManager::getShaderForFilter):
1946         * platform/graphics/texmap/TextureMapperShaderManager.h:
1947         (WebCore::TextureMapperShaderProgram::id):
1948         (WebCore::TextureMapperShaderProgram::vertexAttrib):
1949         (TextureMapperShaderProgram):
1950         (WebCore::TextureMapperShaderProgram::matrixLocation):
1951         (WebCore::TextureMapperShaderProgram::flipLocation):
1952         (WebCore::TextureMapperShaderProgram::textureSizeLocation):
1953         (WebCore::TextureMapperShaderProgram::sourceTextureLocation):
1954         (WebCore::TextureMapperShaderProgram::maskTextureLocation):
1955         (WebCore::TextureMapperShaderProgram::opacityLocation):
1956         (WebCore::TextureMapperShaderProgram::isValidUniformLocation):
1957         (StandardFilterProgram):
1958         (WebCore::StandardFilterProgram::vertexAttrib):
1959         (WebCore::StandardFilterProgram::texCoordAttrib):
1960         (WebCore::StandardFilterProgram::textureUniform):
1961         (WebCore::TextureMapperShaderProgramSimple::create):
1962         (TextureMapperShaderProgramSimple):
1963         (WebCore::TextureMapperShaderProgramRectSimple::create):
1964         (TextureMapperShaderProgramRectSimple):
1965         (WebCore::TextureMapperShaderProgramOpacityAndMask::create):
1966         (TextureMapperShaderProgramOpacityAndMask):
1967         (WebCore::TextureMapperShaderProgramRectOpacityAndMask::create):
1968         (TextureMapperShaderProgramRectOpacityAndMask):
1969         (WebCore::TextureMapperShaderProgramSolidColor::create):
1970         (WebCore::TextureMapperShaderProgramSolidColor::colorLocation):
1971         (TextureMapperShaderProgramSolidColor):
1972         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::create):
1973         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadVerticesInTextureCoordinatesLocation):
1974         (WebCore::TextureMapperShaderProgramAntialiasingNoMask::expandedQuadEdgesInScreenSpaceLocation):
1975         (TextureMapperShaderProgramAntialiasingNoMask):
1976         (WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
1977         (TextureMapperShaderManager):
1978
1979 2012-08-25  Philip Rogers  <pdr@google.com>
1980
1981         Roll out r126056 and r126626
1982         https://bugs.webkit.org/show_bug.cgi?id=95017
1983
1984         Reviewed by Dirk Schulze.
1985
1986         This patch rolls out r126056 which regressed a test.
1987         The getBBox() code removed turns out to be required for tight bounding
1988         boxes in SVGPathElement::getBBox().
1989
1990         When this regression occurred the relevant test was skipped in r126626. This
1991         patch reverts that skip.
1992
1993         No new tests.
1994
1995         * svg/SVGPathElement.cpp:
1996         (WebCore::SVGPathElement::getBBox):
1997         (WebCore):
1998         * svg/SVGPathElement.h:
1999         (SVGPathElement):
2000
2001 2012-08-25  Adam Barth  <abarth@webkit.org>
2002
2003         [V8] V8NodeFilterCondition should use ScopedPersistent
2004         https://bugs.webkit.org/show_bug.cgi?id=95010
2005
2006         Reviewed by Eric Seidel.
2007
2008         V8NodeFilterCondition just re-implements ScopedPersistent by hand.
2009
2010         * bindings/v8/V8NodeFilterCondition.cpp:
2011         (WebCore::V8NodeFilterCondition::V8NodeFilterCondition):
2012         (WebCore::V8NodeFilterCondition::~V8NodeFilterCondition):
2013         (WebCore::V8NodeFilterCondition::acceptNode):
2014         * bindings/v8/V8NodeFilterCondition.h:
2015         (WebCore):
2016         (V8NodeFilterCondition):
2017         (WebCore::V8NodeFilterCondition::create):
2018
2019 2012-07-18  Robert Hogan  <robert@webkit.org>
2020
2021         Tables with just border-style set on the cells do not get a grid
2022         https://bugs.webkit.org/show_bug.cgi?id=84286
2023
2024         Reviewed by Julien Chaffraix.
2025
2026         This is happening because every cell gets a zero-width border in createSharedCellStyle() if the table border is not explictly set. 
2027         FF and Opera don't do this, so leave the cell's border alone if there is no table border explicitly set.
2028
2029         Test: fast/css/table-rules-attribute-none-with-cell-borders.html
2030
2031         * html/HTMLTableElement.cpp:
2032         (WebCore::HTMLTableElement::createSharedCellStyle):
2033         * rendering/RenderTreeAsText.cpp:
2034         (WebCore::RenderTreeAsText::writeRenderObject): Without this we would end up rebaselining a bunch of tests to report 'border: []'
2035          rather than 'border: [none]'. The problem here was that writeRenderObject would only report the first border if it differed from
2036          BorderValue(). What we want is for it to report the first border always and then any borders after that if they differ.
2037
2038 2012-08-25  Andrey Kosyakov  <caseq@chromium.org>
2039
2040         Web Inspector: missing time ruler in Timeline and Network panels
2041         https://bugs.webkit.org/show_bug.cgi?id=95001
2042
2043         Reviewed by Pavel Feldman.
2044
2045         Fixed a call site for Calculator.boundarySpan(), which is now a function rather than a property.
2046
2047         * inspector/front-end/TimelineGrid.js:
2048         (WebInspector.TimelineGrid.prototype.updateDividers):
2049
2050 2012-08-25  Michelangelo De Simone  <michelangelo@webkit.org>
2051
2052         [Crash] Null pointer in CSSParser::parseMixFunction()
2053         https://bugs.webkit.org/show_bug.cgi?id=94998
2054
2055         Reviewed by Benjamin Poulain.
2056
2057         parseMixFunction() may try to access invalid memory when the arguments of the
2058         mix() function are comma-terminated.
2059
2060         * css/CSSParser.cpp:
2061         (WebCore::CSSParser::parseMixFunction):
2062
2063 2012-08-24  Helder Correia  <helder.correia@nokia.com>
2064
2065         [Texmap] Move TextureMapperGL to use GraphicsContext3D
2066         https://bugs.webkit.org/show_bug.cgi?id=78672
2067
2068         Reviewed by Noam Rosenthal.
2069
2070         Introducing a new GraphicsContext3D::texImage2DDirect() to allow
2071         initialization of textures without allocation. The existing
2072         textImage2D() refuses a null pixel buffer, and
2073         texImage2DResourceSafe() allows it but performs memory
2074         allocation and zeroes the bits. This was not fast enough for
2075         BitmapTextureGL frequent setting up.
2076
2077         No new tests, refactoring.
2078
2079         * platform/graphics/GraphicsContext3D.h:
2080         (GraphicsContext3D):
2081         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2082         (WebCore::GraphicsContext3D::texImage2D):
2083         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2084         (WebCore::GraphicsContext3D::texImage2DDirect):
2085         (WebCore):
2086         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2087         (WebCore::GraphicsContext3D::texImage2D):
2088
2089 2012-08-24  Roger Fong  <roger_fong@apple.com>
2090
2091         -webkit-font-smoothing: antialiased should use CG font rendering code path, not GDI
2092         https://bugs.webkit.org/show_bug.cgi?id=54004
2093         <rdar://problem/8971429>
2094
2095         Reviewed by Dan Bernstein.
2096
2097         When specifying -webkit-font-smoothing: antialised; the code path ends up using GDI to draw the text. 
2098         GDI ends up drawing subpixel antialiased text, not aliased text anyways.
2099         The CG code path also has the capability of drawing antialiased text. The reason that the GDI path was 
2100         used in the first place is no longer a concern here so we can stop using the GDI code path.
2101
2102         * platform/graphics/win/FontCGWin.cpp: Removing GDI font drawing code path.
2103         (WebCore):
2104         (WebCore::Font::drawGlyphs):
2105
2106 2012-08-24  Sami Kyostila  <skyostil@chromium.org>
2107
2108         Add support for compositing the contents of overflow:scroll areas
2109         https://bugs.webkit.org/show_bug.cgi?id=91117
2110
2111         Reviewed by Simon Fraser.
2112
2113         Patch by Simon Fraser with modifications by Sami Kyostila and Ian Vollick.
2114
2115         Allow a RenderLayer which exists for overflow scrolling
2116         to use a composited layer for the scrolled contents, which
2117         allows for compositing-accelerated overflow scrolling.
2118
2119         Tests:
2120             compositing/overflow/clipping-ancestor-with-accelerated-scrolling-ancestor.html
2121             compositing/overflow/iframe-inside-overflow-clipping.html
2122             compositing/overflow/nested-scrolling.html
2123             compositing/overflow/overflow-auto-with-touch-no-overflow.html
2124             compositing/overflow/overflow-auto-with-touch.html
2125             compositing/overflow/overflow-clip-with-accelerated-scrolling-ancestor.html
2126             compositing/overflow/overflow-hidden-with-touch.html
2127             compositing/overflow/overflow-overlay-with-touch-no-overflow.html
2128             compositing/overflow/overflow-overlay-with-touch.html
2129             compositing/overflow/overflow-scroll-with-touch-no-overflow.html
2130             compositing/overflow/overflow-visible-with-touch.html
2131             compositing/overflow/remove-overflow-crash.html
2132             compositing/overflow/remove-overflow-crash2.html
2133             compositing/overflow/scrolling-content-clip-to-viewport.html
2134             compositing/overflow/textarea-scroll-touch.html
2135
2136         * platform/graphics/GraphicsLayerClient.h: New paint phase flag
2137         used for scrolled contents. Provide a typedef for the flags
2138         so that they can be ORed together.
2139
2140         * rendering/RenderLayer.h:
2141         (WebCore::ClipRectsCache::ClipRectsCache):
2142         (ClipRectsCache): In debug builds, store a m_respectingOverflowClip
2143         flag so we can ASSERT later that we're fetching clip rects with the
2144         same setting the rects were generated with.
2145         Add new PaintLayerPaintingOverflowContents painting flag.
2146
2147         * rendering/RenderLayer.cpp:
2148         (WebCore::RenderLayer::usesCompositedScrolling): New method returns
2149         true if this layer is using composited overflow scrolling.
2150         (WebCore::RenderLayer::scrollTo): Don't repaint if we're doing
2151         a composited scroll.
2152         (WebCore::RenderLayer::paintLayer): Pass the right flags to backgroundClipRect();
2153         if we're painting scrolled contents, we don't want to take the overflow clip rect
2154         into account.
2155         (WebCore::RenderLayer::paintLayerContents): Ditto. Also don't do the intersectsDamageRect()
2156         check if we're painting scrolled contents.
2157         (WebCore::RenderLayer::updateClipRects): New parameter to tell whether to respect overflow clipping.
2158         Assert if we're fetching cached rects with a different 'respect clip' flag to the one they were generated
2159         with.
2160         (WebCore::RenderLayer::calculateClipRects): Take the 'respectOverflowClip' flag into account
2161         when computing clip rects.
2162         (WebCore::RenderLayer::parentClipRects): Ditto
2163         (WebCore::RenderLayer::backgroundClipRect): Ditto
2164         (WebCore::RenderLayer::calculateRects): Ditto
2165         (WebCore::RenderLayer::childrenClipRect): This function is called from widget code, so may use a different
2166         'respect clip rects' setting than that used for painting, so it has to compute clip rects on the fly.
2167         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Composited scrolling makes a layer not normal-flow only.
2168
2169         * rendering/RenderLayerBacking.h:
2170         (RenderLayerBacking): New member variables for the layers for scrolled contents, and the scrolling
2171         layer which handles the scroll offset.
2172         (WebCore::RenderLayerBacking::hasScrollingLayer):
2173         (WebCore::RenderLayerBacking::scrollingLayer):
2174         (WebCore::RenderLayerBacking::scrollingContentsLayer):
2175
2176         * rendering/RenderLayerBacking.cpp:
2177         (WebCore::RenderLayerBacking::~RenderLayerBacking):
2178         (WebCore::RenderLayerBacking::destroyGraphicsLayers): Tear down the scrolling layers, if any.
2179         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling): Renamed from layerOrAncestorIsTransformed,
2180         since it has to look for composited scrolling layers too.
2181         (WebCore::RenderLayerBacking::shouldClipCompositedBounds): We don't want the contents of scrolling layers
2182         to get clipped to the viewport.
2183         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Create scrolling layers if necessary.
2184         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Set scrolling layer geometry.
2185         (WebCore::RenderLayerBacking::updateInternalHierarchy): Hook up scrolling layers.
2186         (WebCore::RenderLayerBacking::updateDrawsContent): Scrolling layers affect whether the main graphics layer
2187         needs to draw content.
2188         (WebCore::RenderLayerBacking::updateScrollingLayers): Create or destroy scrolling layers.
2189         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): If we have a scrolled contents layer,
2190         the main layer should not paint the foreground.
2191         (WebCore::RenderLayerBacking::parentForSublayers): Sublayers are parented in the scrolling contents
2192         layer if one exists.
2193         (WebCore::RenderLayerBacking::setContentsNeedDisplay): Need to dirty the scrolling contents layer.
2194         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): Ditto.
2195         (WebCore::RenderLayerBacking::paintIntoLayer): Set the right painting flags.
2196         (WebCore::RenderLayerBacking::paintContents): Only clip to the bounds if we're not painting overflow contents.
2197
2198 2012-08-24  Florin Malita  <fmalita@chromium.org>
2199
2200         ASSERTION FAILED: !attached() in WebCore::Node::attach()
2201         https://bugs.webkit.org/show_bug.cgi?id=94650
2202
2203         Reviewed by Abhishek Arya.
2204
2205         Prevent SVGTests::handleAttributeChange() from attaching elements with detached parents.
2206
2207         Test: svg/custom/system-language-crash.html
2208
2209         * svg/SVGTests.cpp:
2210         (WebCore::SVGTests::handleAttributeChange):
2211
2212 2012-08-24  Glenn Adams  <glenn@skynav.com>
2213
2214         CSSStyleDeclaration.cssText should not contain extraneous whitespace in final delimiter
2215         https://bugs.webkit.org/show_bug.cgi?id=94633
2216
2217         Reviewed by Benjamin Poulain.
2218
2219         Ensure cssText final delimiter does not contain extraneous space character after semicolon.
2220
2221         Test: cssom/cssstyledeclaration-csstext-final-delimiter.html
2222
2223         * css/CSSFontFaceRule.cpp:
2224         (WebCore::CSSFontFaceRule::cssText):
2225         Conditionally add SPACE in serialized rule since asText() no longer
2226         contains extra space.
2227         Construct result using StringBuilder.
2228         
2229         * css/CSSPageRule.cpp:
2230         (WebCore::CSSPageRule::cssText):
2231         Conditionally add SPACE in serialized rule since asText() no longer
2232         contains extra space.
2233         Construct result using StringBuilder.
2234         
2235         * css/CSSProperty.cpp:
2236         (WebCore::CSSProperty::cssText):
2237         Ensure serialized property does longer contains extra space in cssText.
2238         Construct result using StringBuilder.
2239         
2240         * css/CSSStyleRule.cpp:
2241         (WebCore::CSSStyleRule::cssText):
2242         Conditionally add SPACE in serialized rule since asText() no longer
2243         contains extra space.
2244         Construct result using StringBuilder.
2245         
2246         * css/CSSStyleSheet.cpp:
2247         (WebCore::CSSStyleSheet::addRule):
2248         Conditionally add SPACE in reserialized rule in case passed style no
2249         longer contains extra space.  Note that if it does already contain an
2250         extra space that inserting an extra space here is harmless (i.e., is
2251         effectively normalized during parse).
2252         Construct result using StringBuilder.
2253         
2254         * css/StylePropertySet.cpp:
2255         (WebCore::StylePropertySet::asText):
2256         Ensure serialized property set does longer contains extra space in final
2257         delimiter.
2258         Construct result using StringBuilder.
2259         
2260         * css/WebKitCSSKeyframeRule.cpp:
2261         (WebCore::StyleKeyframe::cssText):
2262         Conditionally add SPACE in serialized rule since asText() no longer
2263         contains extra space.
2264         Construct result using StringBuilder.
2265         
2266         * editing/ApplyStyleCommand.cpp:
2267         (WebCore::ApplyStyleCommand::addBlockStyle):
2268         Conditionally add SPACE in block style since cssText no longer contains
2269         extra space.
2270         Construct result using StringBuilder.
2271         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2272         Conditionally add SPACE in pre-existing inline style since cssText no
2273         longer contains extra space.
2274         Construct result using StringBuilder.
2275         
2276 2012-08-23  James Robinson  <jamesr@chromium.org>
2277
2278         [chromium] Convert WebLayerTreeView interface into pure virtual
2279         https://bugs.webkit.org/show_bug.cgi?id=94866
2280
2281         Reviewed by Adrienne Walker.
2282
2283         Renames CCLayerTreeHostClient::updateAnimations -> CCLayerTreeHostClient::animate to avoid a naming collision
2284         and to better match the other imperative-sounding calls (like layout).
2285
2286         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2287         (WebCore::CCLayerTreeHost::updateAnimations):
2288         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2289         (CCLayerTreeHostClient):
2290
2291 2012-08-24  James Robinson  <jamesr@chromium.org>
2292
2293         [chromium] Clean up WebAnimation animationId/groupId generation
2294         https://bugs.webkit.org/show_bug.cgi?id=94973
2295
2296         Reviewed by Adrienne Walker.
2297
2298         This gets rid of AnimationIdVendor and simplifies GraphicsLayerChromium's name<->id mapping. We only have to
2299         track the IDs of animations that we have started and can let WebAnimation generate new IDs if we haven't seen
2300         the name before.
2301
2302         * WebCore.gypi:
2303         * platform/graphics/chromium/AnimationIdVendor.cpp: Removed.
2304         * platform/graphics/chromium/AnimationIdVendor.h: Removed.
2305         * platform/graphics/chromium/AnimationTranslationUtil.cpp:
2306         (WebCore::createWebAnimation):
2307         * platform/graphics/chromium/AnimationTranslationUtil.h:
2308         (WebCore):
2309         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2310         (WebCore::GraphicsLayerChromium::addAnimation):
2311         (WebCore::GraphicsLayerChromium::pauseAnimation):
2312         (WebCore::GraphicsLayerChromium::removeAnimation):
2313         * platform/graphics/chromium/GraphicsLayerChromium.h:
2314
2315 2012-08-24  Benjamin Poulain  <bpoulain@apple.com>
2316
2317         Populate DatabaseTracker's origins lazily on demand
2318         https://bugs.webkit.org/show_bug.cgi?id=94649
2319
2320         Reviewed by Brady Eidson.
2321
2322         Previously, we would populate m_quotaMap on startup when initialializing DatabaseTracker.
2323         This takes a significant amount of time and memory and it is not needed in many cases.
2324
2325         This patch change DatabaseTracker to invoke populateOrigins() only when needed.
2326         This saves:
2327         -7-15ms on startup.
2328         -96Kbytes of SQLite page cache
2329         -the size of m_quotaMap on that particular system.
2330
2331         * Modules/webdatabase/DatabaseTracker.cpp:
2332         (WebCore::DatabaseTracker::DatabaseTracker):
2333         (WebCore::DatabaseTracker::hasEntryForOriginNoLock):
2334         (WebCore::DatabaseTracker::populateOriginsIfNeeded):
2335         (WebCore::DatabaseTracker::origins):
2336         (WebCore::DatabaseTracker::quotaForOriginNoLock):
2337         (WebCore::DatabaseTracker::addDatabase):
2338         (WebCore::DatabaseTracker::deleteOrigin):
2339         * Modules/webdatabase/DatabaseTracker.h:
2340         (DatabaseTracker):
2341
2342 2012-08-24  Mark Pilgrim  <pilgrim@chromium.org>
2343
2344         [Chromium] Remove visitedLinkHash from PlatformSupport
2345         https://bugs.webkit.org/show_bug.cgi?id=94965
2346
2347         Reviewed by Adam Barth.
2348
2349         Part of a refactoring series. See tracking bug 82948.
2350
2351         * platform/chromium/LinkHashChromium.cpp:
2352         (WebCore):
2353         (WebCore::visitedLinkHash):
2354         * platform/chromium/PlatformSupport.h:
2355
2356 2012-08-24  Kevin Ellis  <kevers@chromium.org>
2357
2358         [chromium] Reduce padding on popup menu entries when used on a touch screen.
2359         https://bugs.webkit.org/show_bug.cgi?id=94953
2360
2361         Reviewed by Adam Barth.
2362
2363         Prior to the patch, the height of entries in a popup menu was 44px,
2364         which is excessive.  Reduced the padding to make the menu entries
2365         30px tall to match the wrench menu. 
2366
2367         No new tests required.
2368
2369         * platform/chromium/PopupMenuChromium.cpp:
2370         (WebCore):
2371
2372 2012-08-24  Helder Correia  <helder.correia@nokia.com>, Roland Takacs  <rtakacs@inf.u-szeged.hu>
2373
2374         [Texmap] Move TextureMapperGL to use GraphicsContext3D
2375         https://bugs.webkit.org/show_bug.cgi?id=78672
2376
2377         Reviewed by Noam Rosenthal.
2378
2379         This is part of a several patch-refactoring.
2380
2381         Introduce additional logic in GraphicsContext3DQt to support a
2382         new RenderToCurrentGLContext RenderStyle. This is necessary to
2383         use GC3D for other things than WebGL, like TextureMapper.
2384
2385         The GC3D constructor now accepts a RenderStyle instead of the
2386         boolean renderDirectlyToHostWindow and thus mimics create()'s
2387         signature. This has been changed for all ports in this patch.
2388
2389         A new GC3D::createForCurrentGLContext() builder was
2390         introduced to better abstract the goal of using GC3D with the
2391         current context.
2392
2393         The patch was originally developed by Helder Correia and finished
2394         by Roland Takacs.
2395
2396         No new tests, refactoring.
2397
2398 2012-08-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2399
2400         Unreviewed, rolling out r126620.
2401         http://trac.webkit.org/changeset/126620
2402         https://bugs.webkit.org/show_bug.cgi?id=94976
2403
2404         ASSERT((intptr_t)m_bytesAllocated + deltaBytes > 0) is
2405         triggering on the bots (Requested by jchaffraix on #webkit).
2406
2407         * WebCore.gypi:
2408         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2409         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
2410         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
2411         (WebCore::Canvas2DLayerBridge::contextAcquired):
2412         * platform/graphics/chromium/Canvas2DLayerBridge.h:
2413         (Canvas2DLayerBridge):
2414         * platform/graphics/chromium/Canvas2DLayerManager.cpp: Removed.
2415         * platform/graphics/chromium/Canvas2DLayerManager.h: Removed.
2416
2417 2012-08-24  Andrei Onea  <onea@adobe.com>
2418
2419         [CSSRegions]Expose WebKitNamedFlowCollection interface through document.getNamedFlows()
2420         https://bugs.webkit.org/show_bug.cgi?id=93368
2421
2422         Reviewed by Ryosuke Niwa.
2423
2424         The WebKitNamedFlowCollection already implemented was being used by Document to store all
2425         the named flows - regardless of state - so we need to use another class to expose to JS.
2426         WebKitNamedFlowCollection was renamed to NamedFlowCollection since it is used only internally,
2427         and the C++ class used to expose to JS is DOMNamedFlowCollection (with the interface name
2428         WebKitNamedFlowCollection). DOMNamedFlowCollection is exposed via Document::webKitGetFlows(),
2429         and it itself exposes the length property, the indexed getter, and the named getter.
2430         http://dev.w3.org/csswg/css3-regions/#document-getnamedflows
2431
2432         Test: fast/regions/webkit-named-flow-collection.html
2433
2434         * CMakeLists.txt:
2435         * DerivedSources.cpp:
2436         * DerivedSources.make:
2437         * DerivedSources.pri:
2438         * GNUmakefile.list.am:
2439         * Target.pri:
2440         * WebCore.gypi:
2441         * WebCore.vcproj/WebCore.vcproj:
2442         * WebCore.xcodeproj/project.pbxproj:
2443         * bindings/gobject/GNUmakefile.am:
2444         * bindings/scripts/CodeGeneratorJS.pm:
2445         (GenerateImplementation):
2446         We need to use same trick as with HTMLPropertiesCollection, to make NamedGetter generate required code.
2447         * dom/DOMAllInOne.cpp:
2448         * dom/DOMNamedFlowCollection.cpp:
2449         (WebCore):
2450         (WebCore::DOMNamedFlowCollection::DOMNamedFlowCollection):
2451         (WebCore::DOMNamedFlowCollection::length):
2452         (WebCore::DOMNamedFlowCollection::item):
2453         (WebCore::DOMNamedFlowCollection::namedItem):
2454         (WebCore::DOMNamedFlowCollection::hasNamedItem):
2455         * dom/DOMNamedFlowCollection.h:
2456         (WebCore):
2457         (DOMNamedFlowCollection):
2458         (WebCore::DOMNamedFlowCollection::create):
2459         * dom/DOMNamedFlowCollection.idl:
2460         * dom/Document.cpp:
2461         (WebCore):
2462         (WebCore::Document::webkitGetNamedFlows):
2463         (WebCore::Document::namedFlows):
2464         * dom/Document.h:
2465         (WebCore):
2466         (Document):
2467         * dom/Document.idl:
2468         * dom/NamedFlowCollection.cpp:
2469         Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.cpp.
2470         (WebCore):
2471         (WebCore::NamedFlowCollection::NamedFlowCollection):
2472         (WebCore::NamedFlowCollection::namedFlows):
2473         (WebCore::NamedFlowCollection::flowByName):
2474         (WebCore::NamedFlowCollection::ensureFlowWithName):
2475         (WebCore::NamedFlowCollection::discardNamedFlow):
2476         (WebCore::NamedFlowCollection::documentDestroyed):
2477         (WebCore::NamedFlowCollection::createCSSOMSnapshot):
2478         Used to create a snapshot of current named flows in CREATED state.
2479         * dom/NamedFlowCollection.h:
2480         Renamed from Source/WebCore/dom/WebKitNamedFlowCollection.h.
2481         (WebCore):
2482         (NamedFlowCollection):
2483         (WebCore::NamedFlowCollection::create):
2484         (WebCore::NamedFlowCollection::document):
2485         (WebCore::NamedFlowCollection::~NamedFlowCollection):
2486         (WebCore::NamedFlowCollection::NamedFlowHashFunctions::hash):
2487         (WebCore::NamedFlowCollection::NamedFlowHashFunctions::equal):
2488         (NamedFlowCollection::NamedFlowHashFunctions):
2489         (WebCore::NamedFlowCollection::NamedFlowHashTranslator::hash):
2490         (WebCore::NamedFlowCollection::NamedFlowHashTranslator::equal):
2491         Moved NamedFlowHashFunctions and NamedFlowHashTranslator definitions to .h
2492         and made them public, so they can be used in DOMNamedFlow as well.
2493         * dom/WebKitNamedFlow.cpp:
2494         (WebCore::WebKitNamedFlow::WebKitNamedFlow):
2495         (WebCore::WebKitNamedFlow::create):
2496         * dom/WebKitNamedFlow.h:
2497         (WebCore):
2498         (WebKitNamedFlow):
2499         * inspector/InspectorCSSAgent.cpp:
2500         * rendering/FlowThreadController.cpp:
2501         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
2502
2503 2012-08-24  Chris Evans  <cevans@google.com>
2504
2505         Update comment regarding root node handling in XPath for detached trees.
2506         https://bugs.webkit.org/show_bug.cgi?id=36427
2507
2508         Reviewed by Alexey Proskuryakov.
2509
2510         * xml/XPathPath.cpp:
2511         (WebCore::XPath::LocationPath::evaluate): Update XPath root node comment.
2512
2513 2012-08-24  Justin Novosad  <junov@chromium.org>
2514
2515         [Chromium] Implementing a global limit on memory consumed by deferred 2D canvases
2516         https://bugs.webkit.org/show_bug.cgi?id=94386
2517
2518         Reviewed by Stephen White.
2519
2520         Before this change, there was no global bound on memory that could be
2521         consumed for the purpose of recording 2d canvas deferred draw commands.
2522         There was only a per canvas limit. It is possible for canvases to get
2523         dereferenced without flushing pending draw commands, which may lock
2524         resources until the canvas element is garbage collected. This makes
2525         it possible to grow memory consumption indefinitely by hitting reload
2526         successively on some canvas-intensive web pages.
2527
2528         The solution implemented in this change consists in maintaining a
2529         global registry of deferred canvas layers and tracking the sum of
2530         memory allocated by all canvases for the purpose of storing deferred
2531         draw commands. When memory consumption reaches the allowed limit,
2532         caches are cleared and draw operations are flushed on one or several
2533         canvases, starting with the least recently used, until memory
2534         consumption is below a target level.
2535
2536         New tests: webkit_unit_tests DeferredLayerManagerTest*
2537
2538         * WebCore.gypi:
2539         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2540         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
2541         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
2542         (WebCore::Canvas2DLayerBridge::storageAllocatedForRecordingChanged):
2543         Overloaded from SkDeferredCanvas::NotificationClient. Called when
2544         there is a change in the number of bytes allocated by the deferred
2545         canvas.
2546         (WebCore):
2547         (WebCore::Canvas2DLayerBridge::flushedDrawCommands):
2548         Overloaded from SkDeferredCanvas::NotificationClient. Called when
2549         pending draw commands are flush by the deferred canvas.
2550         (WebCore::Canvas2DLayerBridge::freeMemoryIfPossible):
2551         Called by the Canvas2DLayerManager to request the release of unlocked
2552         memory resources (caches). Request is relayed to SkDeferredCanvas.
2553         returns number of bytes freed.
2554         (WebCore::Canvas2DLayerBridge::flush):
2555         Requests that pending draw commands be flushed immediately from the
2556         deferred canvas queue. Request is relayed to SkDeferredCanvas.
2557         (WebCore::Canvas2DLayerBridge::contextAcquired):
2558         * platform/graphics/chromium/Canvas2DLayerBridge.h:
2559         (Canvas2DLayerBridge):
2560         (WebCore::Canvas2DLayerBridge::bytesAllocated):
2561         (WebCore::Canvas2DLayerBridge::updateBytesAllocated):
2562         * platform/graphics/chromium/Canvas2DLayerManager.cpp: Added.
2563         (WebCore):
2564         (WebCore::Canvas2DLayerManager::Canvas2DLayerManager):
2565         (WebCore::Canvas2DLayerManager::~Canvas2DLayerManager):
2566         (WebCore::Canvas2DLayerManager::init):
2567         Sets the global limit for the maximum total number of bytes allocated
2568         by deferred layers.
2569         (WebCore::Canvas2DLayerManager::get):
2570         Singleton accessor
2571         (WebCore::Canvas2DLayerManager::layerDidDraw):
2572         Called by Canvas2DLayerBridge to indicate that the layer was drawn to.
2573         (WebCore::Canvas2DLayerManager::addLayerToList):
2574         (WebCore::Canvas2DLayerManager::layerAllocatedStorageChanged):
2575         Called by Canvas2DLayerBridge to indicate thet the memory consumed by
2576         the layer has changed.
2577         (WebCore::Canvas2DLayerManager::layerDidFlush):
2578         Called by Canvas2DLayerBridge to indicated that the pending draw
2579         commands of the layer were flushed.
2580         (WebCore::Canvas2DLayerManager::layerToBeDestroyed):
2581         Called by Canvas2DLayerBridge upon destruction.
2582         (WebCore::Canvas2DLayerManager::freeMemoryIfNecessary):
2583         Called internally. Check that current memory consumption is below
2584         the tolerated limit.  If check fails, intiates resource releases.
2585         (WebCore::Canvas2DLayerManager::removeLayerFromList):
2586         (WebCore::Canvas2DLayerManager::isInList):
2587         (WebCore::Canvas2DLayerManager::updateBytesAllocated):
2588         * platform/graphics/chromium/Canvas2DLayerManager.h: Added.
2589         (WebCore):
2590         (Canvas2DLayerManager):
2591
2592 2012-08-24  Parth Patel  <parpatel@rim.com>
2593
2594         [BlackBerry] Changes resulting from moving network related methods
2595         from platform client to platform settings.
2596         https://bugs.webkit.org/show_bug.cgi?id=94963
2597
2598         Reviewed by Yong Li.
2599
2600         Changes in response to Network methods moved from
2601         class BlackBerryPlatformClient to class BlackBerryPlatformSettings
2602         in platform repository.
2603
2604         No new tests as there are no logical modifications.
2605
2606         * platform/network/blackberry/NetworkJob.cpp:
2607         (WebCore::NetworkJob::storeCredentials):
2608         * platform/network/blackberry/NetworkStateNotifierBlackBerry.cpp:
2609         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
2610
2611 2012-08-24  Stephen White  <senorblanco@chromium.org>
2612
2613         Enable accelerated Skia implementation of feBlend filter.
2614         https://bugs.webkit.org/show_bug.cgi?id=94954
2615
2616         Reviewed by James Robinson.
2617
2618         Will be covered by existing tests in svg/ when tests are run with
2619         accelerated painting.
2620
2621         * WebCore.gypi:
2622         * platform/graphics/filters/FEBlend.h:
2623         (FEBlend):
2624         * platform/graphics/filters/skia/FEBlendSkia.cpp: Added.
2625         (WebCore):
2626         (WebCore::toSkiaMode):
2627         (WebCore::FEBlend::platformApplySkia):
2628
2629 2012-08-24  Robert Kroeger  <rjkroege@chromium.org>
2630
2631         [chromium] CCLayerTreeHostImpl::scrollBy always assumes screen space deltas
2632         https://bugs.webkit.org/show_bug.cgi?id=94946
2633
2634         Reviewed by James Robinson.
2635
2636         Multiply scrollBy deltas in CCLayerTreeHostImpl to correctly support
2637         scrolling on devices that send deltas in DIP (as opposed to screen)
2638         space. Change is a nop on platforms that have not setDeviceScaleFactor
2639         to a non-unity value.
2640
2641         Tested by existing unit tests.
2642
2643         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2644         (WebCore::CCLayerTreeHostImpl::scrollBy):
2645
2646 2012-08-24  Anish Bhayani  <anish.bhayani@gmail.com>
2647
2648         webkit-image-set() function not showing up when computing background property
2649         https://bugs.webkit.org/show_bug.cgi?id=94536
2650
2651         Reviewed by Simon Fraser.
2652
2653         Added isBaseValueList() to ensure ImageSetClass is not displaying shorthand notation.
2654         Tests to make sure background shows '-webkit-image-set('.
2655
2656         Test: fast/css/image-set-setting.html
2657
2658         * css/CSSValue.h:
2659         (CSSValue):
2660         (WebCore::CSSValue::isBaseValueList):
2661         * css/StylePropertySet.cpp:
2662         (WebCore::StylePropertySet::getLayeredShorthandValue):
2663
2664 2012-08-24  Tony Chang  <tony@chromium.org>
2665
2666         Remove unnecessary CSS selector text generation
2667         https://bugs.webkit.org/show_bug.cgi?id=94857
2668
2669         Reviewed by Ojan Vafai.
2670
2671         When setting the selector text, there was some old code that would
2672         check to see if it was unchanged. That got removed, but the code
2673         to generate the previous selector text is still there.
2674
2675         Covered by fast/css/css-set-selector-text.html and
2676         fast/css/css-set-selector-text-crash.html.
2677
2678         * css/CSSPageRule.cpp:
2679         (WebCore::CSSPageRule::setSelectorText): Remove unused oldSelectorText.
2680         * css/CSSStyleRule.cpp:
2681         (WebCore::CSSStyleRule::setSelectorText): Remove unused oldSelectorText
2682         and rather than update the cache, just invalidate the previous entry since
2683         we may not need the new selector text.
2684
2685 2012-08-24  Cris Neckar  <cdn@chromium.org>
2686
2687         Add support for consumable user gestures
2688         https://bugs.webkit.org/show_bug.cgi?id=94867
2689
2690         Reviewed by Adam Barth.
2691
2692         Adds a static counter of the number of consumable gestures. This is decremented either when
2693         a gestures falls out of scope or is consumed via a call to consumeUserGesture().
2694
2695         Planned usage in Chromium is to prevent the piggybacking of multiple popup windows on a
2696         single user gesture.
2697
2698         No new tests as this should not change behavior. The platform must implement consumable
2699         gestures for this to do anything.
2700
2701         * bindings/v8/ScriptController.cpp:
2702         (WebCore::ScriptController::consumeUserGesture):
2703         (WebCore):
2704         * bindings/v8/ScriptController.h:
2705         (ScriptController):
2706         * dom/UserGestureIndicator.cpp:
2707         (WebCore):
2708         (WebCore::UserGestureIndicator::UserGestureIndicator):
2709         (WebCore::UserGestureIndicator::~UserGestureIndicator):
2710         (WebCore::UserGestureIndicator::consumeUserGesture):
2711         * dom/UserGestureIndicator.h:
2712         (WebCore::UserGestureIndicator::processingUserGesture):
2713         (UserGestureIndicator):
2714
2715 2012-08-24  Bear Travis  <betravis@adobe.com>
2716
2717         [CSS Exclusions] Enable shape-inside for simple rectangles
2718         https://bugs.webkit.org/show_bug.cgi?id=89259
2719
2720         Reviewed by Levi Weintraub.
2721
2722         This patch is the first in a series enabling shape-inside. It adds
2723         support for inline layout within a single render block with a
2724         rectangular shape-inside.
2725         Each RenderBlock with a valid shape-inside maintains a WrapShapeInfo,
2726         which can calculate the areas, or LineSegments, where inline content
2727         can flow on a line. The WrapShapeInfo class maintains a static map of
2728         RenderBlocks to WrapShapeInfos. The basic algorithm involves three stages:
2729         1. Determine if the RenderBlock has a valid shape-inside, and store it
2730         in a WrapShapeInfo if necessary.
2731         2. If the inline content is affected by a shape-inside, use the
2732         corresponding WrapShapeInfo to break the content into line segments.
2733         3. Lay out the line segments.
2734
2735         Tests: fast/exclusions/shape-inside/shape-inside-floats-simple.html
2736                fast/exclusions/shape-inside/shape-inside-inline-elements.html
2737                fast/exclusions/shape-inside/shape-inside-overflow.html
2738                fast/exclusions/shape-inside/shape-inside-percentage-auto.html
2739                fast/exclusions/shape-inside/shape-inside-text.html
2740
2741         * CMakeLists.txt:
2742         * GNUmakefile.list.am:
2743         * Target.pri:
2744         * WebCore.gypi:
2745         * WebCore.vcproj/WebCore.vcproj:
2746         * WebCore.xcodeproj/project.pbxproj:
2747         * rendering/RenderBlock.cpp:
2748         (WebCore::RenderBlock::willBeDestroyed): Remove WrapShapeInfo when destroyed.
2749         (WebCore::RenderBlock::styleDidChange): Detect modifications to style()->wrapShapeInside.
2750         (WebCore):
2751         (WebCore::RenderBlock::updateWrapShapeInfoAfterStyleChange): Update WrapShapeInfo
2752         when style()->wrapShapeInside changes.
2753         (WebCore::RenderBlock::layoutBlock): Notify WrapShapeInfo of changes in logicalWidth
2754         and logicalHeight before laying out inline content.
2755         * rendering/RenderBlock.h:
2756         (RenderBlock):
2757         (WebCore::RenderBlock::wrapShapeInfo): Return the wrapShapeInfo associated with a
2758         RenderBlock.
2759         * rendering/RenderBlockLineLayout.cpp:
2760         (WebCore::LineWidth::LineWidth): Determine the WrapShapeInfo::LineSegment this LineWidth
2761         corresponds to, if any.
2762         (LineWidth):
2763         (WebCore::LineWidth::updateAvailableWidth): The width's LineSegment boundaries affect
2764         the available width.
2765         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): The current LineSegment
2766         affects the left & right positioning of inline boxes.
2767         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Move to the top of the inside wrap
2768         shape before beginning inline layout, and update the line segments for each line.
2769         * rendering/WrapShapeInfo.cpp: Added.
2770         (WebCore):
2771         (WebCore::WrapShapeInfo::WrapShapeInfo): Create an empty WrapShapeInfo.
2772         (WebCore::WrapShapeInfo::~WrapShapeInfo): No additional cleanup.
2773         (WebCore::WrapShapeInfo::create): Create a WrapShapeInfo reference.
2774         (WebCore::WrapShapeInfo::ensureWrapShapeInfoForRenderBlock): Create a WrapShapeInfo
2775         for a RenderBlock with an inside WrapShape and place it in the WrapShapeInfo map.
2776         (WebCore::WrapShapeInfo::wrapShapeInfoForRenderBlock): Lookup the WrapShapeInfo for
2777         a RenderBlock in the WrapShapeInfo map.
2778         (WebCore::WrapShapeInfo::isWrapShapeInfoEnabledForBlock): Determine if a RenderBlock
2779         has an inside wrap shape that we can use for inline layout.
2780         (WebCore::WrapShapeInfo::removeWrapShapeInfoForRenderBlock): Remove a RenderBlock's
2781         WrapShapeInfo from the WrapShapeInfo map.
2782         (WebCore::WrapShapeInfo::hasSegments): Returns true if there are any line segments
2783         for the current line.
2784         (WebCore::WrapShapeInfo::computeShapeSize): Compute the dimensions of the wrap shape
2785         based on a block's logical width & height.
2786         (WebCore::WrapShapeInfo::computeSegmentsForLine): Sets the current line and computes
2787         its line segments.
2788         * rendering/WrapShapeInfo.h: Added.
2789         (WebCore):
2790         (LineSegment):
2791         (WrapShapeInfo):
2792         (WebCore::WrapShapeInfo::shapeTop): The top of a wrap shape, where the inline content
2793         area begins.
2794         (WebCore::WrapShapeInfo::segments): The list of line segments for the current line.
2795         (WebCore::WrapShapeInfo::wrapShapeSizeNeedsRecomputing): Mark a WrapShapeInfo as
2796         needing to recompute its WrapShape dimensions.
2797         (WebCore::WrapShapeInfo::lineState): The current line state: above, inside, or below
2798         the wrap shape.
2799         * rendering/style/RenderStyle.cpp:
2800         (WebCore::RenderStyle::diff): Changes to shape inside require relayout.
2801
2802 2012-08-24  David Hyatt  <hyatt@apple.com>
2803
2804         [New Multicolumn] Plumbing to prepare for contents painting and hit testing implementation.
2805         https://bugs.webkit.org/show_bug.cgi?id=94945
2806
2807         Reviewed by Dan Bernstein.
2808
2809         Make some improvements to how column sets interact with flow threads. Make sure the last column set
2810         always expands to hold all of the remaining flow thread contents (including overflow). Rename the
2811         column height, count and width variables to have "computed" in front of them to indicate that they
2812         just represent what the multi-column algorithm computed so that there is no confusion between the
2813         computed column count and the actual number of columns in the set.
2814         
2815         Implement the ability to get the actual column count based off the logical height of the flow thread
2816         portion contained within the column set.
2817         
2818         Fix gap painting to use the actual column count rather than the computed column count.
2819
2820         * rendering/RenderFlowThread.cpp:
2821         (WebCore::RenderFlowThread::layout):
2822         After a flow thread is done laying out, have it tell the last region to expand to
2823         encompass all the remaining contents if it wants to do so. Column and page sets will always do this.
2824
2825         * rendering/RenderMultiColumnFlowThread.h:
2826         (RenderMultiColumnFlowThread):
2827         Override computeLogicalHeight() to do nothing. We want the flow thread to just keep its intrinsic
2828         height, since the last column set is always going to expand to encompass the flow thread's contents
2829         anyway. Unlike CSS Regions, we don't ever "run out of room."
2830         
2831         * rendering/RenderMultiColumnSet.cpp:
2832         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2833         (WebCore::RenderMultiColumnSet::computeLogicalWidth):
2834         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
2835         (WebCore::RenderMultiColumnSet::columnCount):
2836         (WebCore::RenderMultiColumnSet::columnRectAt):
2837         (WebCore::RenderMultiColumnSet::paintColumnRules):
2838         (WebCore::RenderMultiColumnSet::paintColumnContents):
2839         Rename count, width and height for columns to have "computed" in front of the members and functions.
2840         In particular, this lets us distinguish the computed column count from the actual column count.
2841
2842         * rendering/RenderMultiColumnSet.h:
2843         (WebCore::RenderMultiColumnSet::computedColumnCount):
2844         (WebCore::RenderMultiColumnSet::computedColumnWidth):
2845         (WebCore::RenderMultiColumnSet::computedColumnHeight):
2846         (WebCore::RenderMultiColumnSet::setComputedColumnWidthAndCount):
2847         (WebCore::RenderMultiColumnSet::setComputedColumnHeight):
2848         Rename count, width and height for columns to have "computed" in front of the members and functions.
2849         In particular, this lets us distinguish the computed column count from the actual column count.
2850         
2851         * rendering/RenderRegion.h:
2852         (RenderRegion):
2853         (WebCore::RenderRegion::expandToEncompassFlowThreadContentsIfNeeded):
2854         * rendering/RenderRegionSet.cpp:
2855         (WebCore::RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded):
2856         (WebCore):
2857         * rendering/RenderRegionSet.h:
2858         (RenderRegionSet):
2859         Make sure region sets expand to encompass all the remaining flow thread contents. We are always
2860         able to generate more columns or pages, so in effect the amount of the flow thread we can
2861         consume is unlimited.
2862
2863
2864 2012-08-24  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2865
2866         [Qt] Range input progress indicator is upside down when vertical and RTL is set
2867         https://bugs.webkit.org/show_bug.cgi?id=94948
2868
2869         Reviewed by Kenneth Rohde Christiansen.
2870
2871         RTL should not affect vertical sliders, but on Qt it was changing the
2872         direction of the progress indicator, making it flow in the opposite
2873         direction of the knob.
2874
2875         * platform/qt/RenderThemeQtMobile.cpp:
2876         (WebCore::RenderThemeQtMobile::paintSliderTrack):
2877
2878 2012-08-24  Parth Patel  <parpatel@rim.com>
2879
2880         [BlackBerry] Changes resulting from moving application directory methods from platform client to platform settings.
2881         https://bugs.webkit.org/show_bug.cgi?id=94249
2882
2883         Reviewed by Rob Buis.
2884
2885         PR 170160
2886
2887         Changes in response to Application Directory methods moved from
2888         Class BlackBerryPlatformClient to BlackBerryPlatformSettings in
2889         platform respository since these methods are more appropriate in
2890         class BlackBerryPlatformSettings.
2891
2892         No new tests as there are no logical modifications.
2893
2894         * platform/blackberry/CookieManager.cpp:
2895         (WebCore::CookieManager::CookieManager):
2896         * platform/blackberry/FileSystemBlackBerry.cpp:
2897         (WebCore::homeDirectoryPath):
2898         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2899         (WebCore::MediaPlayerPrivate::load):
2900         * platform/network/blackberry/AutofillBackingStore.cpp:
2901         (WebCore::autofillBackingStore):
2902         * platform/network/blackberry/CredentialBackingStore.cpp:
2903         (WebCore::credentialBackingStore):
2904         * platform/network/blackberry/NetworkJob.cpp:
2905         (WebCore::NetworkJob::sendRequestWithCredentials):
2906         * plugins/PluginDatabase.cpp:
2907         (WebCore::PluginDatabase::isPreferredPluginDirectory):
2908
2909 2012-08-24  Ilya Tikhonovsky  <loislo@chromium.org>
2910
2911         Web Inspector: do not count weak and shortcut edges.
2912         https://bugs.webkit.org/show_bug.cgi?id=94947
2913
2914         Reviewed by Yury Semikhatsky.
2915
2916         When calculating distance from an object to Window in heap profiler we should only
2917         take into account strong real references. This means that shortcuts and weak edges should be ignored.
2918
2919         * inspector/front-end/HeapSnapshot.js:
2920         (WebInspector.HeapSnapshot.prototype._bfs):
2921
2922 2012-08-24  Julien Chaffraix  <jchaffraix@webkit.org>
2923
2924         Crash in RenderTableCell::borderTop() due to custom scrollbars after r124168
2925         https://bugs.webkit.org/show_bug.cgi?id=93903
2926
2927         Reviewed by Tony Chang.
2928
2929         r124168 changed when we create scrollbars so that it happens (rightly) at style change time.
2930         However the RenderScrollbar code assumes that any overflow: scroll RenderScrollbar would be
2931         created at layout time as it directly tries to layout to scrollbar parts. The big issues with
2932         the move is that the first style change operates on a detached renderer which means that we
2933         could crash in some situation.
2934
2935         Test: scrollbars/custom-scrollbar-table-cell.html
2936
2937         * rendering/RenderScrollbarPart.cpp:
2938         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
2939         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
2940         Fixed the crash by using style information instead of calling the renderer. This is guaranteed
2941         to be safe but it also means that custom scrollbars sizing is not right on table cells with
2942         collapsing borders. The existing logic was querying layout information at style change so I
2943         wouldn't bet on it working properly anyway.
2944
2945 2012-08-24  Julien Chaffraix  <jchaffraix@webkit.org>
2946
2947         Remove RenderTableSection::removeChild
2948         https://bugs.webkit.org/show_bug.cgi?id=94883
2949
2950         Reviewed by Abhishek Arya.
2951
2952         This change removed removeChild, replaced by willBeRemoved calls in the children
2953         class. This is done to ensure that post-removal invalidations are properly done
2954         in table rows and table cells.
2955
2956         Refactoring covered by existing tests.
2957
2958         * rendering/RenderTableSection.cpp:
2959         (WebCore::RenderTableSection::removeChild):
2960         * rendering/RenderTableSection.h:
2961         Removed this function...
2962
2963         * rendering/RenderTableCell.cpp:
2964         (WebCore::RenderTableCell::willBeRemovedFromTree):
2965         * rendering/RenderTableCell.h:
2966         (RenderTableCell):
2967         * rendering/RenderTableRow.cpp:
2968         (WebCore::RenderTableRow::willBeRemovedFromTree):
2969         * rendering/RenderTableRow.h:
2970         ... and moved the invalidation into the willBeRemovedFromTree functions.
2971         The willBeRemovedFromTree replaced the willBeDestroyed functions in the
2972         2 classes as the invalidation really represented tree removal updates,
2973         not death updates.
2974
2975 2012-08-24  Joshua Netterfield  <jnetterfield@rim.com>
2976
2977         [BlackBerry] Extend LayerFilterRenderer in preparation for CSS Shaders
2978         https://bugs.webkit.org/show_bug.cgi?id=94724
2979
2980         Reviewed by George Staikos.
2981
2982         LayerFilterRenderer defines a CSS Filter in terms of one or more `Action`s.
2983         A LayerFilterRendererAction holds a vertex shader, a fragment shader, and
2984         zero or more `Parameter`s. A Parameter is a uniform, varying, or other
2985         information which is needed to render a filter.
2986
2987         This patch implements certain new Parameter types, including vertex/element
2988         buffers and vertex attributes which are needed to implement composited
2989         CSS Shaders on BB10. In addition, a new drawing mode is required in order
2990         to draw CSS Shaders meshes from vertex/element buffers.
2991
2992         No new tests, because this patch introduces no new functionality. When
2993         the patch which enables CSS Shaders on BB10 in upstreamed, tests for
2994         CSS Shaders will prove this code to be correct.
2995
2996         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
2997         (WebCore::operationTypeToProgramID):
2998         (WebCore::Uniform::Uniform):
2999         (WebCore::Uniform1f::create):
3000         (WebCore::Uniform1f::Uniform1f):
3001         (WebCore):
3002         (WebCore::Uniform1i::apply):
3003         (WebCore::Uniform1i::create):
3004         (WebCore::Uniform1i::Uniform1i):
3005         (WebCore::Uniform2f::create):
3006         (WebCore::Uniform2f::Uniform2f):
3007         (WebCore::Uniform3f::create):
3008         (WebCore::Uniform3f::Uniform3f):
3009         (WebCore::Uniform4f::apply):
3010         (WebCore::Uniform4f::create):
3011         (WebCore::Uniform4f::Uniform4f):
3012         (WebCore::Matrix4fv::apply):
3013         (WebCore::Matrix4fv::create):
3014         (WebCore::Matrix4fv::Matrix4fv):
3015         (WebCore::Matrix4fv::~Matrix4fv):
3016         (WebCore::Buffer::apply):
3017         (WebCore::Buffer::restoreState):
3018         (WebCore::Buffer::create):
3019         (WebCore::Buffer::Buffer):
3020         (WebCore::VertexAttribf::apply):
3021         (WebCore::VertexAttribf::restoreState):
3022         (WebCore::VertexAttribf::create):
3023         (WebCore::VertexAttribf::VertexAttribf):
3024         (WebCore::LayerFilterRendererAction::LayerFilterRendererAction):
3025         (WebCore::LayerFilterRendererAction::useActionOn):
3026         (WebCore::LayerFilterRendererAction::restoreState):
3027         (WebCore::LayerFilterRenderer::LayerFilterRenderer):
3028         (WebCore::LayerFilterRenderer::actionsForOperations):
3029         (WebCore::LayerFilterRenderer::applyActions):
3030         * platform/graphics/blackberry/LayerFilterRenderer.h:
3031         (Parameter):
3032         (WebCore::Parameter::restoreState):
3033         (WebCore::Parameter::~Parameter):
3034         (WebCore::Parameter::Parameter):
3035         (WebCore):
3036         (Uniform):
3037         (WebCore::Uniform::~Uniform):
3038         (Uniform1f):
3039         (Uniform1i):
3040         (Uniform2f):
3041         (Uniform3f):
3042         (Uniform4f):
3043         (Matrix4fv):
3044         (Buffer):
3045         (VertexAttribf):
3046         (WebCore::LayerFilterRendererAction::appendParameter):
3047         (LayerFilterRendererAction):
3048         (WebCore::LayerFilterRendererAction::drawingMode):
3049         (WebCore::LayerFilterRendererAction::setDrawingMode):
3050         (WebCore::LayerFilterRendererAction::drawingModeParameter):
3051         (WebCore::LayerFilterRendererAction::setDrawingModeParameter):
3052
3053 2012-08-24  Tommy Widenflycht  <tommyw@google.com>
3054
3055         MediaStream API: Add readyState functionality to RTCPeerConnection
3056         https://bugs.webkit.org/show_bug.cgi?id=94813
3057
3058         Reviewed by Adam Barth.
3059
3060         This patch adds readyState functionality to RTCPeerConnection together with related callbacks and methods.
3061
3062         Test: fast/mediastream/RTCPeerConnection-state.html
3063
3064         * Modules/mediastream/RTCPeerConnection.cpp:
3065         (WebCore::RTCPeerConnection::RTCPeerConnection):
3066         (WebCore::RTCPeerConnection::readyState):
3067         (WebCore):
3068         (WebCore::RTCPeerConnection::close):
3069         (WebCore::RTCPeerConnection::didChangeReadyState):
3070         (WebCore::RTCPeerConnection::stop):
3071         (WebCore::RTCPeerConnection::changeReadyState):
3072         * Modules/mediastream/RTCPeerConnection.h:
3073         (RTCPeerConnection):
3074         * Modules/mediastream/RTCPeerConnection.idl:
3075         * platform/mediastream/RTCPeerConnectionHandler.cpp:
3076         (RTCPeerConnectionHandlerDummy):
3077         (WebCore::RTCPeerConnectionHandlerDummy::stop):
3078         (WebCore):
3079         * platform/mediastream/RTCPeerConnectionHandler.h:
3080         (RTCPeerConnectionHandler):
3081         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
3082         (RTCPeerConnectionHandlerClient):
3083         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
3084         (WebCore::RTCPeerConnectionHandlerChromium::RTCPeerConnectionHandlerChromium):
3085         (WebCore::RTCPeerConnectionHandlerChromium::stop):
3086         (WebCore):
3087         (WebCore::RTCPeerConnectionHandlerChromium::didChangeReadyState):
3088         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
3089         (RTCPeerConnectionHandlerChromium):
3090
3091 2012-08-24  Andrey Adaikin  <aandrey@chromium.org>
3092
3093         Web Inspector: [WebGL] A follow up to simplify code with nested closures
3094         https://bugs.webkit.org/show_bug.cgi?id=94931
3095
3096         Reviewed by Pavel Feldman.
3097
3098         Simplifies the code with nested closures.
3099
3100         * inspector/InjectedScriptWebGLModuleSource.js:
3101         (.):
3102
3103 2012-08-24  Vsevolod Vlasov  <vsevik@chromium.org>
3104
3105         Web Inspector: Get rid of frontendReused logic on front-end.
3106         https://bugs.webkit.org/show_bug.cgi?id=94929
3107
3108         Reviewed by Pavel Feldman.
3109
3110         Removed frontendReused method from ResourceTreeModel.
3111
3112         * inspector/front-end/ResourceTreeModel.js:
3113         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
3114         * inspector/front-end/Workspace.js:
3115         (WebInspector.Workspace): workspace doesn't need to listen for CachedResourcesLoaded event anymore.
3116         * inspector/front-end/inspector.js: removed unused method.
3117
3118 2012-08-24  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3119
3120         Share WebKit-Gtk's Enchant implementation with others WebKit ports.
3121         https://bugs.webkit.org/show_bug.cgi?id=94320
3122
3123         Reviewed by Carlos Garcia Campos.
3124
3125         The main reason of this change is to share WebKit-Gtk implementation of spelling
3126         with others ports that use the Enchant library.
3127         This is the first step to enable spelling for WebKit-Efl (https://bugs.webkit.org/show_bug.cgi?id=91854)
3128
3129         Files that implement spelling were moved to platform/text/enchant directory.
3130
3131         This patch stops using Pango backend to find the beginning/end of the word.
3132         Those information are delivered through ICU interface by using TextBreakIterator.
3133
3134         * GNUmakefile.am: Added newly created 'enchant' directory to WebKit-Gtk's sources.
3135         * GNUmakefile.list.am: Updated location of TextCheckerEnchant.{h,cpp} files.
3136
3137         * editing/visible_units.cpp: Removed 'static' modifier for 'isLogicalStartOfWord' and 'islogicalEndOfWord' functions.
3138         (WebCore::isLogicalStartOfWord):
3139         (WebCore::islogicalEndOfWord):
3140         * editing/visible_units.h: Added isLogicalStartOfWord' and 'islogicalEndOfWord' functions to header as they are used by TextCheckerEnchant.cpp
3141
3142         * platform/text/enchant/TextCheckerEnchant.cpp: Renamed from Source/WebCore/platform/text/gtk/TextCheckerEnchant.cpp.
3143         (enchantDictDescribeCallback): Added comments.
3144         (TextCheckerEnchant::TextCheckerEnchant):
3145         (TextCheckerEnchant::~TextCheckerEnchant):
3146         (TextCheckerEnchant::ignoreWord):
3147         (TextCheckerEnchant::learnWord):
3148         (TextCheckerEnchant::checkSpellingOfString): Using ICU instead of Pango to find out the beginning/end of the word.
3149         (TextCheckerEnchant::getGuessesForWord): Replaced gchar type to char.
3150         (TextCheckerEnchant::updateSpellCheckingLanguages): Using WebCore::defaulLanguage() instead of Pango backend.
3151         (TextCheckerEnchant::getSpellCheckingLanguages):
3152         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
3153         * platform/text/enchant/TextCheckerEnchant.h: Renamed from Source/WebCore/platform/text/gtk/TextCheckerEnchant.h.
3154         (WebCore):
3155         (TextCheckerEnchant):
3156         (WebCore::TextCheckerEnchant::create):
3157
3158 2012-08-24  Pavel Feldman  <pfeldman@chromium.org>
3159
3160         Web Inspector: do not send profile headers to the front-end until explicitly requested.
3161         https://bugs.webkit.org/show_bug.cgi?id=94928
3162
3163         Reviewed by Vsevolod Vlasov.
3164
3165         Simple flag is added.
3166
3167         * inspector/InspectorProfilerAgent.cpp:
3168         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
3169         (WebCore::InspectorProfilerAgent::addProfile):
3170         (WebCore::InspectorProfilerAgent::disable):
3171         (WebCore::InspectorProfilerAgent::getProfileHeaders):
3172         (WebCore):
3173         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
3174         * inspector/InspectorProfilerAgent.h:
3175         (InspectorProfilerAgent):
3176
3177 2012-08-24  Pavel Feldman  <pfeldman@chromium.org>
3178
3179         Web Inspector: make ui component compile
3180         https://bugs.webkit.org/show_bug.cgi?id=94827
3181
3182         Reviewed by Vsevolod Vlasov.
3183
3184         Moved buildImagePreviewContents into the sdk-aware code.
3185         Drive-by more compilation fixes.
3186
3187         * inspector/compile-front-end.py:
3188         * inspector/front-end/DOMPresentationUtils.js:
3189         (WebInspector.DOMPresentationUtils.buildImagePreviewContents.errorCallback):
3190         (WebInspector.DOMPresentationUtils.buildImagePreviewContents.buildContent):
3191         (WebInspector.DOMPresentationUtils.buildImagePreviewContents):
3192         * inspector/front-end/Database.js:
3193         * inspector/front-end/DefaultTextEditor.js:
3194         (WebInspector.TextEditorMainPanel):
3195         (WebInspector.TextEditorMainPanel.prototype._createLink):
3196         * inspector/front-end/ElementsPanel.js:
3197         * inspector/front-end/NetworkPanel.js:
3198         (WebInspector.NetworkDataGridNode.prototype._refreshNameCell):
3199         * inspector/front-end/ParsedURL.js:
3200         (WebInspector.ParsedURL.prototype.get displayName):
3201         * inspector/front-end/ResourceUtils.js:
3202         * inspector/front-end/SourceFrame.js:
3203         (WebInspector.TextEditorDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
3204         (WebInspector.TextEditorDelegateForSourceFrame.prototype.createLink):
3205         * inspector/front-end/TextEditor.js:
3206         (WebInspector.TextEditorDelegate.prototype.populateTextAreaContextMenu):
3207         (WebInspector.TextEditorDelegate.prototype.createLink):
3208         * inspector/front-end/TimelinePresentationModel.js:
3209         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
3210         * inspector/front-end/UIUtils.js:
3211
3212 2012-08-24  'Pavel Feldman'  <pfeldman@chromium.org>
3213
3214         Not reviewed: fixing inspector/elements/iframe-load-event.html broken by r126572.
3215
3216         * inspector/front-end/DOMAgent.js:
3217         (WebInspector.DOMNode.prototype.resolveURL):
3218
3219 2012-08-24  Andrey Adaikin  <aandrey@chromium.org>
3220
3221         Web Inspector: [WebGL] Implement custom wrap functions on GL context
3222         https://bugs.webkit.org/show_bug.cgi?id=94799
3223
3224         Reviewed by Pavel Feldman.
3225
3226         Implement custom wrap functions on WebGL rendering context for WebGL instrumentation.
3227
3228         * inspector/InjectedScriptWebGLModuleSource.js:
3229         (.):
3230
3231 2012-08-24  Pavel Feldman  <pfeldman@chromium.org>
3232
3233         Web Inspector: resolve URLs upon creation, get rid of populateHrefContextMenu
3234         https://bugs.webkit.org/show_bug.cgi?id=94900
3235
3236         Reviewed by Vsevolod Vlasov.
3237
3238         - This change makes sure we resolve URLs upon adding the to the UI. Then we treat them as absolute links in context menu, etc.
3239         - There is no need to override context menu for links anymore - system menu will do.
3240
3241         * inspector/front-end/AuditResultView.js:
3242         (WebInspector.AuditResultView):
3243         * inspector/front-end/ConsoleView.js:
3244         * inspector/front-end/DOMAgent.js:
3245         (WebInspector.DOMNode.prototype.descendantUserPropertyCount):
3246         (WebInspector.DOMNode.prototype.resolveURL):
3247         * inspector/front-end/ElementsPanel.js:
3248         * inspector/front-end/ElementsTreeOutline.js:
3249         (WebInspector.ElementsTreeOutline.prototype.populateContextMenu):
3250         (WebInspector.ElementsTreeElement.prototype._buildAttributeDOM):
3251         * inspector/front-end/HandlerRegistry.js:
3252         (WebInspector.HandlerRegistry.prototype.appendApplicableItems):
3253         (WebInspector.HandlerRegistry.prototype._appendContentProviderItems):
3254         (WebInspector.HandlerRegistry.prototype._appendHrefItems):
3255         * inspector/front-end/ParsedURL.js:
3256         (WebInspector.ParsedURL.completeURL):
3257         * inspector/front-end/ResourceUtils.js:
3258         (WebInspector.linkifyRequestAsNode):
3259         * inspector/front-end/StylesSidebarPane.js:
3260         (WebInspector.StylesSidebarPane):
3261         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.linkifyURL):
3262         * inspector/front-end/UIUtils.js:
3263
3264 2012-08-24  Xan Lopez  <xlopez@igalia.com>
3265
3266         [GTK] Use the new 'feature_defines' variable to generate DOM bindings
3267         https://bugs.webkit.org/show_bug.cgi?id=94919
3268
3269         Reviewed by Carlos Garcia Campos.
3270
3271         Update to use the new 'feature_defines' variable, otherwise the
3272         bindings will be broken.
3273
3274         * bindings/gobject/GNUmakefile.am: ditto.
3275
3276 2012-08-24  Kentaro Hara  <haraken@chromium.org>
3277
3278         Remove RefPtr from HTMLTextAreaElement::m_placeholder
3279         https://bugs.webkit.org/show_bug.cgi?id=94338
3280
3281         Reviewed by Kent Tamura.
3282
3283         To avoid reference cycles of RefPtr<Node>s, we want to remove
3284         unnecessary RefPtr<Node>s. The rationale is described in bug 94324.
3285
3286         HTMLTextAreaElement::m_placeholder does not need to be a RefPtr<Node>,
3287         because it is guaranteed to point to a shadow DOM tree of the
3288         HTMLTextAreaElement node, which is guaranteed to exist in the subtree
3289         of the HTMLTextAreaElement node.
3290
3291         No tests. No change in behavior.
3292
3293         * html/HTMLTextAreaElement.cpp:
3294         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
3295         (WebCore::HTMLTextAreaElement::placeholderElement):
3296         (WebCore::HTMLTextAreaElement::attach):
3297         (WebCore::HTMLTextAreaElement::updatePlaceholderText):
3298         * html/HTMLTextAreaElement.h:
3299         (HTMLTextAreaElement):
3300
3301 2012-08-24  Dan Carney  <dcarney@google.com>
3302
3303         [V8] Refactor away IsolatedWorld
3304         https://bugs.webkit.org/show_bug.cgi?id=93971
3305
3306         Reviewed by Kentaro Hara.
3307
3308         Remove IsolatedWorld class as it was 1:1 with DOMWrapperWorld.
3309         This paves the way towards a JSC-like use of DOMWrapperWorld.
3310
3311         No new tests. No change in functionality.
3312
3313         * UseV8.cmake:
3314         * WebCore.gypi:
3315         * bindings/v8/DOMWrapperWorld.cpp:
3316         (WebCore):
3317         (WebCore::DOMWrapperWorld::createUninitializedWorld):
3318         (WebCore::DOMWrapperWorld::createMainWorld):
3319         (WebCore::mainThreadNormalWorld):
3320         (WebCore::isolatedWorldMap):
3321         (WebCore::DOMWrapperWorld::deallocate):
3322         (WebCore::DOMWrapperWorld::getOrCreateIsolatedWorld):
3323         * bindings/v8/DOMWrapperWorld.h:
3324         (DOMWrapperWorld):
3325         (WebCore::DOMWrapperWorld::isolatedWorldsExist):
3326         (WebCore::DOMWrapperWorld::isMainWorld):
3327         (WebCore::DOMWrapperWorld::worldId):
3328         (WebCore::DOMWrapperWorld::extensionGroup):
3329         (WebCore::DOMWrapperWorld::domDataStore):
3330         (WebCore::DOMWrapperWorld::deref):
3331         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
3332         * bindings/v8/IsolatedWorld.cpp: Removed.
3333         * bindings/v8/IsolatedWorld.h: Removed.
3334         * bindings/v8/ScriptController.cpp:
3335         (WebCore::ScriptController::evaluateInIsolatedWorld):
3336         * bindings/v8/V8DOMMap.cpp:
3337         (WebCore::DOMDataStoreHandle::DOMDataStoreHandle):
3338         (WebCore::DOMDataStoreHandle::~DOMDataStoreHandle):
3339         * bindings/v8/V8DOMMap.h:
3340         (DOMDataStoreHandle):
3341         * bindings/v8/V8DOMWrapper.h:
3342         (WebCore::V8DOMWrapper::getCachedWrapper):
3343         * bindings/v8/V8IsolatedContext.cpp:
3344         (WebCore::V8IsolatedContext::V8IsolatedContext):
3345         (WebCore::V8IsolatedContext::destroy):
3346         * bindings/v8/V8IsolatedContext.h:
3347         (V8IsolatedContext):
3348         (WebCore::V8IsolatedContext::getEntered):
3349         (WebCore::V8IsolatedContext::world):
3350         * bindings/v8/V8PerIsolateData.h:
3351         (WebCore::V8PerIsolateData::registerDOMDataStore):
3352         (WebCore::V8PerIsolateData::unregisterDOMDataStore):
3353
3354 2012-08-24  Adam Barth  <abarth@webkit.org>
3355
3356         [V8] Improve the developer ergonomics of ScopedPersistent
3357         https://bugs.webkit.org/show_bug.cgi?id=94901
3358
3359         Reviewed by Kentaro Hara.
3360
3361         As requested by haraken, this patch adds some helper functions to
3362         ScopedPersistent so that we don't need to call get() all the time.
3363
3364         * bindings/v8/ScheduledAction.cpp:
3365         (WebCore::ScheduledAction::execute):
3366         * bindings/v8/ScopedPersistent.h:
3367         (WebCore::ScopedPersistent::get):
3368         (WebCore::ScopedPersistent::operator->):
3369         (ScopedPersistent):
3370         (WebCore::ScopedPersistent::isEmpty):
3371         * bindings/v8/ScriptValue.cpp:
3372         (WebCore::ScriptValue::getString):
3373         (WebCore::ScriptValue::toString):
3374         * bindings/v8/ScriptValue.h:
3375         (WebCore::ScriptValue::isFunction):
3376         (WebCore::ScriptValue::isNull):
3377         (WebCore::ScriptValue::isUndefined):
3378         (WebCore::ScriptValue::isObject):
3379         (WebCore::ScriptValue::hasNoValue):
3380         * bindings/v8/V8AbstractEventListener.cpp:
3381         (WebCore::V8AbstractEventListener::~V8AbstractEventListener):
3382         (WebCore::V8AbstractEventListener::getReceiverObject):
3383         * bindings/v8/V8AbstractEventListener.h:
3384         (WebCore::V8AbstractEventListener::hasExistingListenerObject):
3385         * bindings/v8/V8DOMWindowShell.cpp:
3386         (WebCore::V8DOMWindowShell::isContextInitialized):
3387         (WebCore::V8DOMWindowShell::disposeContextHandles):
3388         (WebCore::V8DOMWindowShell::clearForClose):
3389         (WebCore::V8DOMWindowShell::clearForNavigation):
3390         (WebCore::V8DOMWindowShell::initContextIfNeeded):
3391         (WebCore::V8DOMWindowShell::updateDocumentWrapper):
3392         (WebCore::V8DOMWindowShell::updateDocumentWrapperCache):
3393         (WebCore::V8DOMWind