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