[SOUP] Provide logging for SocketStreamHandleSoup
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-10-24  Seokju Kwon  <seokju.kwon@samsung.com>
2
3         [SOUP] Provide logging for SocketStreamHandleSoup
4         https://bugs.webkit.org/show_bug.cgi?id=100215
5
6         Reviewed by Alexey Proskuryakov.
7
8         Add logging to SocketStreamHandleSoup to facilitate debugging.
9
10         * platform/network/soup/SocketStreamHandleSoup.cpp:
11         (WebCore::SocketStreamHandle::SocketStreamHandle):
12         (WebCore::SocketStreamHandle::~SocketStreamHandle):
13         (WebCore::SocketStreamHandle::platformSend):
14         (WebCore::SocketStreamHandle::platformClose):
15
16 2012-10-24  Nico Weber  <thakis@chromium.org>
17
18         Pass on exif orientation from ImageSource when using the open-source image decoders
19         https://bugs.webkit.org/show_bug.cgi?id=100164
20
21         Reviewed by Eric Seidel.
22
23         The orientation is honored always for image documents, and optionally
24         for <img> elements if shouldRespectImageOrientation is set (off by
25         default). However, the feature needs port-specific modifications to
26         GraphicsContext (without this, webcore will use the rotated bounds but
27         draw the image as if it hadn't be rotated, resulting in squished
28         pixels), and most ports don't implement these yet -- so put
29         turning this on for image documents behind a port-specific #ifdef.
30
31         No observable behavior change. Once it's hooked up, it will be tested
32         by fast/images/exif-orientation.html.
33
34         * platform/graphics/ImageSource.cpp:
35         (WebCore::ImageSource::size):
36         (WebCore::ImageSource::frameSizeAtIndex):
37         (WebCore::ImageSource::orientationAtIndex):
38         * platform/graphics/chromium/DeferredImageDecoder.cpp:
39         (WebCore::DeferredImageDecoder::orientation):
40         (WebCore):
41         * platform/graphics/chromium/DeferredImageDecoder.h:
42         (DeferredImageDecoder):
43         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
44         (WebCore::readImageOrientation):
45         * rendering/RenderObject.cpp:
46         (WebCore::RenderObject::shouldRespectImageOrientation):
47
48 2012-10-24  Beth Dakin  <bdakin@apple.com>
49
50         https://bugs.webkit.org/show_bug.cgi?id=100169
51         We should make TileCache tiles the size of the tile coverage rect 
52         when we can't do fast scrolling
53         -and-
54         <rdar://problem/12505021>
55
56         Reviewed by Simon Fraser.
57
58         Some websites that don't do fast scrolling still scroll slower than 
59         they do with tiled drawing disabled. 
60         https://bugs.webkit.org/show_bug.cgi?id=99768 addressed some of this 
61         performance problem, but there is still more ground to make up. This 
62         patch addresses the remaining issue by making tiles the size of the 
63         window when we can't do fast scrolling. 
64
65         The constructor and create function no longer take a size parameter. 
66         That's all fully controlled within TileCache now. m_tileSize is no 
67         longer const.
68         * platform/graphics/ca/mac/TileCache.h:
69
70         Store the current default size as constants so that we can access it 
71         in both the constructor and adjustTileSizeForCoverageRect().
72         * platform/graphics/ca/mac/TileCache.mm:
73         (WebCore::TileCache::TileCache):
74
75         This new function will set m_tileSize to the size of the tile 
76         coverage rect if the tile coverage is limited to the visible area. 
77         Otherwise, the tiles are set to be the default size.
78         (WebCore::TileCache::adjustTileSizeForCoverageRect):
79         
80         Call adjustTileSizeForCoverageRect().
81         (WebCore::TileCache::revalidateTiles):
82
83         No need to send in a size anymore.
84         * platform/graphics/ca/mac/WebTileCacheLayer.h:
85         (WebCore):
86
87 2012-10-24  David Barton  <dbarton@mathscribe.com>
88
89         MathML tests trigger font cache assertions in debug bots
90         https://bugs.webkit.org/show_bug.cgi?id=100268
91
92         Reviewed by Eric Seidel.
93
94         Add a FontCachePurgePreventer to fix this.
95
96         Tested by existing tests.
97
98         * rendering/mathml/RenderMathMLOperator.cpp:
99         (WebCore::RenderMathMLOperator::updateFromElement):
100
101 2012-10-24  Tim Horton  <timothy_horton@apple.com>
102
103         Update main frame scroll position immediately for programmatic scrolls
104         https://bugs.webkit.org/show_bug.cgi?id=98074
105
106         Reviewed by Simon Fraser.
107
108         Immediately update the main frame scroll position after a programmatic scroll,
109         so that performing a scrollBy or scrollTo will be instantly reflected in
110         all of the scroll offset accessors.
111
112         No new tests; this will be tested by many scrolling tests once WebKitTestRunner
113         can use threaded scrolling.
114
115         * page/scrolling/ScrollingCoordinator.cpp:
116         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
117
118 2012-10-24  Mihai Parparita  <mihaip@chromium.org>
119
120         [Chromium] Allow pushState and related history APIs to be disabled per context
121         https://bugs.webkit.org/show_bug.cgi?id=99780
122
123         Reviewed by Adam Barth.
124
125         Chrome Apps do not support the history API (or navigation in general).
126         Since pushState is generally feature detected, it's cleanest to disable
127         it via a V8 per-context feature, so that applications can have the
128         appropriate fallback behavior (other history APIs are re-mapped to throw
129         exceptions, since history.back() and the link are not feature detected).
130
131         * dom/ContextFeatures.cpp:
132         (WebCore::ContextFeatures::pushStateEnabled):
133         (WebCore):
134         * dom/ContextFeatures.h:
135         * dom/Document.cpp:
136         (WebCore::Document::enqueuePopstateEvent):
137         * page/History.idl:
138
139 2012-10-24  Tommy Widenflycht  <tommyw@google.com>
140
141         MediaStream API: Make sure all events are dispatched asynchronously
142         https://bugs.webkit.org/show_bug.cgi?id=100286
143
144         Reviewed by Adam Barth.
145
146         This is necessary to safeguard against if the UA uses synchronous UA->WebKit calls,
147         and the web application calls methods on the RTCPeerConnection in the event callbacks.
148
149         Test: fast/mediastream/RTCPeerConnection-events.html
150         Also tested by the chromium webrtc fuzz tests.
151
152         * Modules/mediastream/RTCPeerConnection.cpp:
153         (WebCore::RTCPeerConnection::RTCPeerConnection):
154         (WebCore::RTCPeerConnection::negotiationNeeded):
155         (WebCore::RTCPeerConnection::didGenerateIceCandidate):
156         (WebCore::RTCPeerConnection::didAddRemoteStream):
157         (WebCore::RTCPeerConnection::didRemoveRemoteStream):
158         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
159         (WebCore::RTCPeerConnection::changeReadyState):
160         (WebCore::RTCPeerConnection::changeIceState):
161         (WebCore):
162         (WebCore::RTCPeerConnection::scheduleDispatchEvent):
163         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
164         * Modules/mediastream/RTCPeerConnection.h:
165         (RTCPeerConnection):
166
167 2012-10-24  Mark Pilgrim  <pilgrim@chromium.org>
168
169         [Chromium] Remove screen-related functions from PlatformSupport
170         https://bugs.webkit.org/show_bug.cgi?id=97474
171
172         Reviewed by Adam Barth.
173
174         Screen-related functions like screenHorizontalDPI that
175         used to be on PlatformSupport are now accessed through a new
176         PlatformPageClient attached to Widget in WebCore-land, which is
177         implemented by ChromeClientImpl in WebKit-land, which proxies
178         calls to WebWidgetClient, which is actually implemented in
179         Chromium-land.
180
181         * WebCore.gypi:
182         * platform/Widget.h:
183         * platform/chromium/PageClientChromium.h: Copied from Source/WebCore/platform/chromium/PlatformWidget.h.
184         (PageClientChromium):
185         * platform/chromium/PlatformScreenChromium.cpp:
186         (WebCore::toPlatformPageClient):
187         (WebCore):
188         (WebCore::screenHorizontalDPI):
189         (WebCore::screenVerticalDPI):
190         (WebCore::screenDepth):
191         (WebCore::screenDepthPerComponent):
192         (WebCore::screenIsMonochrome):
193         (WebCore::screenRect):
194         (WebCore::screenAvailableRect):
195         * platform/chromium/PlatformSupport.h:
196         (PlatformSupport):
197
198 2012-10-24  Adam Barth  <abarth@webkit.org>
199
200         [V8] WorkerContextExecutionProxy doesn't need to track events
201         https://bugs.webkit.org/show_bug.cgi?id=100295
202
203         Reviewed by Eric Seidel.
204
205         This code was added when this code was originally upstreamed as part of
206         the Chromium port. There doesn't appear to be any reason why
207         WorkerContextExecutionProxy needs to keep a Vector of raw event
208         pointers. Those points are likely to become dangling, making the rest
209         of what this code does very sketchy.
210
211         * bindings/v8/V8WorkerContextEventListener.cpp:
212         (WebCore::V8WorkerContextEventListener::callListenerFunction):
213         * bindings/v8/WorkerContextExecutionProxy.cpp:
214         (WebCore::WorkerContextExecutionProxy::dispose):
215         * bindings/v8/WorkerContextExecutionProxy.h:
216         (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
217         (WorkerContextExecutionProxy):
218
219 2012-10-24  Max Vujovic  <mvujovic@adobe.com>
220
221         [CSS Shaders] The mesh should be specified using <column, row> order
222         https://bugs.webkit.org/show_bug.cgi?id=96285
223
224         Reviewed by Dean Jackson.
225
226         Change StyleResolver and CSSComputedStyleDeclaration to handle the mesh parameters in
227         column, row order.
228
229         Test: css3/filters/custom/custom-filter-mesh-column-row-order.html
230
231         * css/CSSComputedStyleDeclaration.cpp:
232         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
233             Append the number of columns before the number of rows in the meshParameters
234             CSSValueList.
235         * css/StyleResolver.cpp:
236         (WebCore::StyleResolver::createCustomFilterOperation):
237             Store the second mesh parameter in meshRows instead of meshColumns.
238
239 2012-10-24  Jae Hyun Park  <jae.park@company100.net>
240
241         loaderRunLoop() should use synchronization instead of while loop
242         https://bugs.webkit.org/show_bug.cgi?id=55402
243
244         Reviewed by Alexey Proskuryakov.
245
246         Originally, loaderRunLoop() sleeps until a thread has started and set
247         the loaderRunLoopObject static variable. This patch uses
248         ThreadCondition to synchronize instead of a while loop.
249
250         No new tests (No behavior change).
251
252         * platform/network/cf/LoaderRunLoopCF.cpp:
253         (WebCore::runLoaderThread):
254         (WebCore::loaderRunLoop):
255         * platform/network/cf/LoaderRunLoopCF.h:
256         (WebCore):
257
258 2012-10-24  Sailesh Agrawal  <sail@chromium.org>
259
260         Incorrect keycodes for numpad /, -, +, .
261         https://bugs.webkit.org/show_bug.cgi?id=99188
262
263         Reviewed by Tony Chang.
264
265         In r57951 we switched to mapping keys by character code.
266         This regressed the numpad keys which no longer match the Windows virtual key codes.
267         This CL fixes this by never mapping numpad keys by character code.
268
269         Test: platform/mac/fast/events/numpad-keycode-mapping.html
270
271         * platform/mac/PlatformEventFactoryMac.mm:
272         (WebCore::windowsKeyCodeForKeyEvent):
273
274 2012-10-24  Simon Fraser  <simon.fraser@apple.com>
275
276         Null-check the RenderView in ocument::windowScreenDidChange to fix a crash when saving PDFs
277         https://bugs.webkit.org/show_bug.cgi?id=100141
278         <rdar://problem/12559147>
279
280         Reviewed by Tim Horton.
281
282         For PDF documents the RenderView is null, so null-check it to avoid a crash
283         when saving PDFs.
284
285         * dom/Document.cpp:
286         (WebCore::Document::windowScreenDidChange):
287
288 2012-10-24  Terry Anderson  <tdanderson@chromium.org>
289
290         Handle two-finger tap gestures in the same way as long-press gestures
291         https://bugs.webkit.org/show_bug.cgi?id=99947
292
293         Reviewed by Adam Barth.
294
295         Currently a long-press gesture is used to dispatch a context menu (for platforms 
296         defining CONTEXT_MENUS) or to select text (for Android). Additionally, for platforms 
297         defining TOUCH_ADJUSTMENT, gesture target fuzzing is performed on the location and 
298         touch area of the long-press gesture.
299
300         This CL will cause two-finger tap gestures to be handled in the same way as long-press 
301         gestures. The location and touch area of a two-finger tap gesture will correspond to 
302         the location and touch area of the first finger down; the location/area of the second 
303         finger will be ignored.
304
305         Test: touchadjustment/touch-links-two-finger-tap.html
306
307         * page/EventHandler.cpp:
308         (WebCore::EventHandler::handleGestureLongPress):
309         (WebCore):
310         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
311         (WebCore::EventHandler::handleGestureTwoFingerTap):
312         (WebCore::EventHandler::adjustGesturePosition):
313         * page/EventHandler.h:
314         (EventHandler):
315
316 2012-10-24  Chris Fleizach  <cfleizach@apple.com>
317
318         AX:When aria-label is used, the text under an element is still appearing as the AXTitle
319         https://bugs.webkit.org/show_bug.cgi?id=98167
320
321         Reviewed by Beth Dakin.
322
323         According to WAI-ARIA text computation, the presence of aria-label and alternative text
324         should override the visible text within an element.
325
326         Test: platform/mac/accessibility/aria-label-overrides-visible-text.html
327
328         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
329         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
330
331 2012-10-24  Sheriff Bot  <webkit.review.bot@gmail.com>
332
333         Unreviewed, rolling out r132303 and r132312.
334         http://trac.webkit.org/changeset/132303
335         http://trac.webkit.org/changeset/132312
336         https://bugs.webkit.org/show_bug.cgi?id=100287
337
338         Triggering crashes on many popular websites (Requested by
339         leviw|gardening on #webkit).
340
341         * css/CSSGrammar.y.in:
342         * css/CSSParser.cpp:
343         (WebCore::CSSParser::detectAtToken):
344         * css/CSSParser.h:
345         * css/CSSPropertySourceData.h:
346         * css/RuleSet.cpp:
347         (WebCore::RuleData::RuleData):
348         (WebCore::RuleSet::addRule):
349         (WebCore::RuleSet::addRegionRule):
350         (WebCore::RuleSet::addRulesFromSheet):
351         (WebCore::RuleSet::addStyleRule):
352         * css/RuleSet.h:
353         (RuleData):
354         (RuleSet):
355         * css/StyleResolver.cpp:
356         (WebCore::makeRuleSet):
357         (WebCore::StyleResolver::appendAuthorStyleSheets):
358         (WebCore::StyleResolver::matchScopedAuthorRules):
359         (WebCore::StyleResolver::locateSharedStyle):
360         * css/StyleResolver.h:
361         (StyleResolver):
362         * css/StyleRule.cpp:
363         (WebCore::StyleRuleBase::reportMemoryUsage):
364         (WebCore::StyleRuleBase::destroy):
365         (WebCore::StyleRuleBase::copy):
366         (WebCore::StyleRuleBase::createCSSOMWrapper):
367         * css/StyleRule.h:
368         * css/StyleScopeResolver.cpp:
369         (WebCore::StyleScopeResolver::reportMemoryUsage):
370         * css/StyleScopeResolver.h:
371         (WebCore):
372         (StyleScopeResolver):
373         * css/StyleSheetContents.cpp:
374         (WebCore::childRulesHaveFailedOrCanceledSubresources):
375
376 2012-10-24  Joshua Bell  <jsbell@chromium.org>
377
378         IndexedDB: Cursor property value identities should be preserved
379         https://bugs.webkit.org/show_bug.cgi?id=100051
380
381         Reviewed by Tony Chang.
382
383         Some W3C test submissions point out that subsequent accesses to cursor properties should
384         yield the same value until the cursor advances. We handled this with custom binding code for
385         IDBCursor.value but not IDBCursor.key or IDBCursor.primaryKey. The custom value code is
386         being removed in webkit.org/b/100034 in favor of returning ScriptValue and the same fix can
387         be applied to key/primaryKey.
388
389         Test: storage/indexeddb/cursor-properties.html
390
391         * Modules/indexeddb/IDBCursor.cpp: Compute/store/serve up ScriptValues instead of IDBKeys
392         (WebCore::IDBCursor::key):
393         (WebCore::IDBCursor::primaryKey):
394         (WebCore::IDBCursor::setValueReady):
395         * Modules/indexeddb/IDBCursor.h:
396         (IDBCursor):
397         (WebCore::IDBCursor::idbPrimaryKey): Expose this for callers that need access to the IDBKey
398         * Modules/indexeddb/IDBCursor.idl:
399         * Modules/indexeddb/IDBObjectStore.cpp: ... like this one.
400         (WebCore):
401         * Modules/indexeddb/IDBRequest.cpp:
402         (WebCore::IDBRequest::dispatchEvent): Pass along script context, for the conversion.
403         * bindings/v8/IDBBindingUtilities.cpp:
404         (WebCore::idbKeyToScriptValue): New method for explicit conversion.
405         (WebCore):
406         * bindings/v8/IDBBindingUtilities.h:
407         (WebCore):
408
409 2012-10-24  Ami Fischman  <fischman@chromium.org>
410
411         call to setNeedsLayout during RenderVideo::paintReplaced
412         https://bugs.webkit.org/show_bug.cgi?id=100265
413
414         Reviewed by Eric Carlson.
415
416         Removed unnecessary call and added new defensive guards to catch erroneous setNeedsLayout() calls
417         during paints earlier (so the offending calls are in the emitted stacktrace).
418
419         No new tests - new defensive checks are triggered by existing tests.
420
421         * page/FrameView.cpp:
422         (WebCore::FrameView::paintContents): forbid setNeedsLayout() during painting
423         * rendering/RenderObject.cpp:
424         (WebCore):
425         (WebCore::RenderObject::SetLayoutNeededForbiddenScope::SetLayoutNeededForbiddenScope):
426         (WebCore::RenderObject::SetLayoutNeededForbiddenScope::~SetLayoutNeededForbiddenScope):
427         * rendering/RenderObject.h:
428         (RenderObject):
429         (SetLayoutNeededForbiddenScope): added helper class for forbidding setNeedsLayout() in a scope.
430         * rendering/RenderVideo.cpp:
431         (WebCore::RenderVideo::paintReplaced): drop the offending & unnecessary call to updatePlayer().
432
433 2012-10-24  Adam Barth  <abarth@webkit.org>
434
435         [V8] ActiveDOMObjectEpilogueVisitor is unnecessary and can be deleted
436         https://bugs.webkit.org/show_bug.cgi?id=100208
437
438         Reviewed by Eric Seidel.
439
440         Rather than clearing and re-establishing the weak callback for
441         ActiveDOMObjects during every GC, this patch puts all the
442         ActiveDOMObjects with pending activity into an object group with a live
443         object, causing them not to be garbage collected.
444
445         In addition to simplifying this code, this patch makes the patch in
446         https://bugs.webkit.org/show_bug.cgi?id=100175 much easier because
447         V8GCController no longer needs to know how to configure the weak
448         callbacks for these objects.
449
450         * bindings/v8/V8GCController.cpp:
451         (WebCore::ActiveDOMObjectPrologueVisitor::ActiveDOMObjectPrologueVisitor):
452         (ActiveDOMObjectPrologueVisitor):
453         (WebCore::ActiveDOMObjectPrologueVisitor::visitDOMWrapper):
454         (WebCore::V8GCController::majorGCPrologue):
455         (WebCore::V8GCController::majorGCEpilogue):
456         * bindings/v8/V8PerIsolateData.cpp:
457         (WebCore::V8PerIsolateData::V8PerIsolateData):
458         * bindings/v8/V8PerIsolateData.h:
459         (WebCore::V8PerIsolateData::liveRoot):
460         (V8PerIsolateData):
461
462 2012-10-24  Brady Eidson  <beidson@apple.com>
463
464         Add a strategy for loader customization.
465         https://bugs.webkit.org/show_bug.cgi?id=100278
466
467         Reviewed by Alexey Proskuryakov.
468
469         It's empty for now and does nothing, just like the goggles.
470
471         * WebCore.gypi:
472         * WebCore.vcproj/WebCore.vcproj:
473         * WebCore.xcodeproj/project.pbxproj:
474         * platform/PlatformStrategies.h:
475         (WebCore::PlatformStrategies::loaderStrategy):
476         (PlatformStrategies):
477         (WebCore::PlatformStrategies::PlatformStrategies):
478
479 2012-10-24  Tony Chang  <tony@chromium.org>
480
481         Setting width of a flexitem causes the adjacent flex item to be displayed poorly.
482         https://bugs.webkit.org/show_bug.cgi?id=99925
483
484         Reviewed by Ojan Vafai.
485
486         Make sure that we always repaint when moving a child. This is similar to what RenderDeprecatedFlexibleBox does.
487
488         Test: css3/flexbox/repaint-during-resize-no-flex.html
489
490         * rendering/RenderFlexibleBox.cpp:
491         (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Move logic for repaining into the helper method
492         for setting the location of a child.
493         (WebCore::RenderFlexibleBox::layoutColumnReverse): Remove code for repaint since it's now in setFlowAwareLocationForChild.
494         (WebCore::RenderFlexibleBox::adjustAlignmentForChild): Remove code for repaint since it's now in setFlowAwareLocationForChild.
495
496 2012-10-24  Simon Fraser  <simon.fraser@apple.com>
497
498         Fix CALayer hiearchy when combining tiling with preserve-3d
499         https://bugs.webkit.org/show_bug.cgi?id=100205
500
501         Reviewed by Dean Jackson.
502
503         When an element has "transform-style: preserve-3d", its GraphicsLayerCA has a
504         m_structuralLayer which is a CATransformLayer. The primary CALayer which contains rendered
505         content becomes a sublayer of the CATransformLayer. If the element has backface-visibility:hidden,
506         it is the primary layer that is set to be single-sided.
507         
508         In r131940 we started to use TileCaches in place of CATiledLayer. TileCaches work via
509         "customSublayers" returned from the PlatformCALayer, where the custom sublayer is 
510         the tile cache container layer. However, the custom sublayers were being added as
511         children of the structural (CATransformLayer) layer, not of the primary (CALayer) layer,
512         thus they were not affected by the doubleSided property.
513         
514         This change cleans up the confusing code in GraphicsLayerCA::updateSublayerList()
515         by maintaining two vectors of PlatformCALayers, one for sublayers of the structural
516         layer, and one for sublayers of the primary layer. It adds custom sublayers to
517         the latter list, so now the tile cache container layer becomes a sublayer of
518         the primary layer, so is affected by that layer's doubleSided property.
519
520         Test: compositing/tiling/backface-preserve-3d-tiled.html
521
522         * platform/graphics/ca/GraphicsLayerCA.cpp:
523         (WebCore::GraphicsLayerCA::updateSublayerList):
524
525 2012-10-23  Zhenyao Mo  <zmo@google.com>
526
527         Update mozilla's CheckedInt.h to the latest version
528         https://bugs.webkit.org/show_bug.cgi?id=100177
529
530         Reviewed by Kenneth Russell.
531
532         * html/canvas/CheckedInt.h: Sync with mozilla's copy with minumum modifications.
533         (detail):
534         (IsSupportedPass2):
535         (IsSupported):
536         (UnsignedType):
537         (IsSigned):
538         (TwiceBiggerType):
539         (PositionOfSignBit):
540         (MinValue):
541         (MaxValue):
542         (WebCore::detail::HasSignBit):
543         (WebCore::detail::BinaryComplement):
544         (WebCore::detail::IsInRange):
545         (WebCore::detail::IsAddValid):
546         (WebCore::detail::IsSubValid):
547         (WebCore::detail::IsMulValid):
548         (WebCore::detail::IsDivValid):
549         (WebCore::detail::OppositeIfSignedImpl::run):
550         (WebCore::detail::OppositeIfSigned):
551         (WebCore):
552         (CheckedInt):
553         (WebCore::CheckedInt::CheckedInt):
554         (WebCore::CheckedInt::value):
555         (WebCore::CheckedInt::isValid):
556         (WebCore::CheckedInt::operator -):
557         (WebCore::CheckedInt::operator ==):
558         (WebCore::CheckedInt::operator++):
559         (WebCore::CheckedInt::operator--):
560         (CastToCheckedIntImpl):
561         (WebCore::detail::CastToCheckedIntImpl::run):
562         (WebCore::castToCheckedInt):
563         (WebCore::operator ==):
564         * html/canvas/DataView.cpp: change valid() to isValid().
565         (WebCore::DataView::create):
566         * html/canvas/WebGLBuffer.cpp: Ditto.
567         (WebCore::WebGLBuffer::associateBufferDataImpl):
568         (WebCore::WebGLBuffer::associateBufferSubDataImpl):
569         * html/canvas/WebGLRenderingContext.cpp: Ditto.
570         (WebCore):
571         (WebCore::WebGLRenderingContext::drawArrays):
572         * platform/graphics/GraphicsContext3D.cpp: Ditto.
573         (WebCore::GraphicsContext3D::computeImageSizeInBytes):
574
575 2012-10-24  Noam Rosenthal  <noam.rosenthal@nokia.com>
576
577         [Qt-on-Mac] GraphicsSurfaces should not create a global IOSurface handle
578         https://bugs.webkit.org/show_bug.cgi?id=89885
579
580         Reviewed by Kenneth Rohde Christiansen.
581
582         Use mach_port instead of global tokens for IOSurfaces.
583         Global IOSurfaces are accessible from other processes using their handle, while mach_ports
584         can only be shared directly via IPC.
585
586         Tested by existing WebGL tests.
587
588         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
589         (GraphicsSurfaceToken):
590         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
591         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
592         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
593
594 2012-10-24  Rick Byers  <rbyers@chromium.org>
595
596         image-set doesn't round-trip properly with cssText
597         https://bugs.webkit.org/show_bug.cgi?id=99725
598
599         Reviewed by Beth Dakin.
600
601         Fix serialization of -webkit-image-set rules to use the same format as
602         is used for parsing.
603
604         Test: fast/css/image-set-setting.html
605
606         * css/CSSImageSetValue.cpp:
607         (WebCore::CSSImageSetValue::customCssText):
608         * css/CSSValueList.h:
609         (WebCore::CSSValueList::item): Add const overload
610
611 2012-10-24  Jonathan Feldstein  <jfeldstein@rim.com>
612
613         BlackBerry fix for webgl-depth-texture.html
614         https://bugs.webkit.org/show_bug.cgi?id=100258
615
616         Reviewed by Yong Li.
617
618         Removed a platform specific define that is unnecessary.
619
620         * platform/graphics/GraphicsContext3D.cpp:
621         (WebCore::GraphicsContext3D::computeFormatAndTypeParameters):
622
623 2012-10-24  Nico Weber  <thakis@chromium.org>
624
625         Honor image orientation in GraphicsContextSkia
626         https://bugs.webkit.org/show_bug.cgi?id=100179
627
628         Reviewed by Stephen White.
629
630         Also fix a bug in ImageOrientation.h: Some of the values were
631         switched. They now match the description in the exif spec at
632         http://www.exif.org/Exif2-2.PDF page 18, and the notes at
633         http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html and
634         the picture at http://www.80sidea.com/archives/2316.
635
636         They showed up correctly in Safari because the orientation transform
637         was done after flipping Y. Let the flipping happen later. I verified
638         that flipping transformation order and fixing the exif enum cancelled
639         each other out, so this has no effect on the apple port.
640
641         Not hooked up yet, so no observable difference.
642
643         * platform/graphics/BitmapImage.h:
644         * platform/graphics/ImageOrientation.h:
645         (WebCore::ImageOrientation::usesWidthAsHeight):
646         (WebCore::ImageOrientation::fromEXIFValue):
647         * platform/graphics/cg/GraphicsContextCG.cpp:
648         (WebCore::GraphicsContext::drawNativeImage):
649         * platform/graphics/skia/ImageSkia.cpp:
650         (WebCore::paintSkBitmap):
651         (WebCore::BitmapImage::draw):
652         (WebCore):
653
654 2012-10-24  Alexey Proskuryakov  <ap@apple.com>
655
656         Fixed Windows path for SharedWorkerStrategy.h - it's in workers/, not platform/.
657
658         * WebCore.vcproj/WebCore.vcproj:
659
660 2012-10-24  Chris Fleizach  <cfleizach@apple.com>
661
662         AX: WebKit exposes abstract ARIA role range as AXSlider; should be generic AXGroup
663         https://bugs.webkit.org/show_bug.cgi?id=100204
664
665         Reviewed by Beth Dakin.
666
667         Remove the "range" role as a valid ARIA role.
668
669         Test: platform/mac/accessibility/aria-slider-value.html
670
671         * accessibility/AccessibilityObject.cpp:
672         (WebCore::createARIARoleMap):
673
674 2012-10-24  Florin Malita  <fmalita@chromium.org>
675
676         [Chromium] SVG repaint issues
677         https://bugs.webkit.org/show_bug.cgi?id=99874
678
679         Reviewed by Levi Weintraub.
680
681         RenderSVGRoot::paintReplaced() converts the container offsets to a relative transform,
682         but in doing so it ends up accumulating subpixel rounding deltas twice: first for 
683         adjustedPaintOffset and second in localToParentTransform(). If coordinates are on
684         half-pixel boundaries, the 2x rounding delta yields a full pixel drift and we end up
685         painting at the wrong location.
686
687         This can be avoided by using localToBorderBoxTransform() directly, which (unlike
688         localToParentTransform()) doesn't perform rounding.
689
690         No new tests: existing pixel results cover this change after rebaseline.
691
692         * rendering/svg/RenderSVGRoot.cpp:
693         (WebCore::RenderSVGRoot::paintReplaced):
694
695 2012-10-24  Levi Weintraub  <leviw@chromium.org>
696
697         Fixing the Chromium build after typo in r132367.
698
699         * WebCore.gypi:
700
701 2012-10-24  Nico Weber  <thakis@chromium.org>
702
703         [chromium] Respect image orientation in image dragging code
704         https://bugs.webkit.org/show_bug.cgi?id=100200
705
706         Reviewed by Tony Chang.
707
708         Based on the corresponding code in DragImageMac.mm.  The image
709         rotation code isn't hooked up yet, so no observable effect for now.
710
711         * platform/chromium/DragImageChromiumSkia.cpp:
712         (WebCore::createDragImageFromImage):
713
714 2012-10-24  Michael Saboff  <msaboff@apple.com>
715
716         Code cleanup after r132165
717         https://bugs.webkit.org/show_bug.cgi?id=100135
718
719         Reviewed by Geoffrey Garen.
720
721         Fixed up some unneccesary and inefficient constructs in MarkupTokenBase.h.
722
723         Code clean up without functional changes, therefore no new tests.
724
725         * xml/parser/MarkupTokenBase.h:
726         (WebCore::MarkupTokenBase::beginEndTag): Changed argument to be const Vector<LChar, 32>&.
727         (WebCore::MarkupTokenBase::appendToCharacter): Changed argument to be const Vector<LChar, 32>&.
728         (WebCore::MarkupTokenBase::appendToName): Elimintated inline.
729         (WebCore::MarkupTokenBase::name): Elimintated inline.
730         (WebCore::MarkupTokenBase::nameString): Elimintated inline.
731
732 2012-10-24  Toni Barzic  <tbarzic@chromium.org>
733
734         Crash when trying to write exception message to null console
735         https://bugs.webkit.org/show_bug.cgi?id=99658
736
737         Reviewed by Adam Barth.
738
739         DOMWindow::console may return NULL, so we should do a NULL check before adding message to it.
740         This may happen e.g. if a worker throws an exception just as the document is being replaced in the view.
741         The exception task could be processes after current window in the frame changes, and console in the document window is nulled.
742
743         Test: fast/workers/worker-exception-during-navigation.html
744
745         * dom/Document.cpp:
746         (WebCore::Document::addMessage):
747
748 2012-10-24  Cosmin Truta  <ctruta@rim.com>
749
750         Incorrect conditional use of LogFTP
751         https://bugs.webkit.org/show_bug.cgi?id=100260
752
753         Reviewed by Alexey Proskuryakov.
754
755         Use LogFTP if !LOG_DISABLED, to allow toggling ASSERTIONS_DISABLED_DEFAULT
756         without breaking the build.
757
758         * html/FTPDirectoryDocument.cpp:
759         (WebCore::FTPDirectoryDocument::FTPDirectoryDocument):
760
761 2012-10-23  Alexey Proskuryakov  <ap@apple.com>
762
763         Add a strategy for shared workers
764         https://bugs.webkit.org/show_bug.cgi?id=100165
765
766         Reviewed by Brady Eidson.
767
768         Also a little bit of alphabetization.
769
770         * WebCore.gypi:
771         * WebCore.vcproj/WebCore.vcproj:
772         * WebCore.xcodeproj/project.pbxproj:
773         * platform/PlatformStrategies.h:
774         * workers/SharedWorkerStrategy.h: Added.
775
776 2012-10-24  David Barton  <dbarton@mathscribe.com>
777
778         [MathML] Timeouts on linux after r132264
779         https://bugs.webkit.org/show_bug.cgi?id=100202
780
781         Reviewed by Eric Seidel.
782
783         When building a stretched operator, such as a large parenthesis or bracket, we need to
784         check that the extension glyph's height is > 0, to avoid an infinite loop. The 0 height
785         can occur if the glyph is missing on the host system.
786
787         Tested by existing tests.
788
789         * rendering/mathml/RenderMathMLOperator.cpp:
790         (WebCore::RenderMathMLOperator::updateFromElement):
791
792 2012-10-24  Parth Patel  <parpatel@rim.com>
793
794         [BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
795         Generic ThreadUnsafe Singleton
796         https://bugs.webkit.org/show_bug.cgi?id=100145
797
798         Reviewed by Rob Buis.
799
800         Extending the singletons to generic singleton and changing
801         getInstance() in IconDatabaseClientBlackBerry to instance()
802         to match the generic singleton template.
803
804         Reviewed Internally by Yong Li.
805
806         Tests are not modified and added as there was no behavioural change.
807
808         * platform/blackberry/SharedTimerBlackBerry.cpp:
809         (SharedTimerBlackBerry):
810         (WebCore):
811
812 2012-10-24  Ilya Tikhonovsky  <loislo@chromium.org>
813
814         Web Inspector: NMI add instrumentation for ResourceBuffer. It gives us 10mb on gmail
815         https://bugs.webkit.org/show_bug.cgi?id=100254
816
817         Reviewed by Yury Semikhatsky.
818
819         * loader/ResourceBuffer.cpp:
820         (WebCore::ResourceBuffer::reportMemoryUsage):
821         (WebCore):
822         * loader/ResourceBuffer.h:
823         (ResourceBuffer):
824
825 2012-10-24  Eric Carlson  <eric.carlson@apple.com>
826
827         Allow ports to override text track rendering style
828         https://bugs.webkit.org/show_bug.cgi?id=97800
829         <rdar://problem/12044964>
830
831         Unreviewed Build fix.
832         
833         CGFloat is already a float in a 32-bit build so narrowPrecisionToFloat() is unnecessary
834
835         * page/CaptionUserPreferencesMac.mm:
836         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale):
837
838 2012-10-24  Eric Carlson  <eric.carlson@apple.com>
839
840         Allow ports to override text track rendering style
841         https://bugs.webkit.org/show_bug.cgi?id=97800
842         <rdar://problem/12044964>
843
844         Reviewed by Maciej Stachowiak.
845
846         * WebCore.exp.in: Export new WebkitSystemInterface functions.
847         * WebCore.xcodeproj/project.pbxproj: Add CaptionUserPreferences.h, CaptionUserPreferencesMac.mm,
848             and CaptionUserPreferencesMac.h.
849
850         * css/mediaControls.css: Rearrange the caption CSS so it is possible to style the cue window,
851             background, and text independently.
852
853         * html/HTMLMediaElement.cpp:
854         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_disableCaptions with theme->userPrefersCaptions().
855         (WebCore::HTMLMediaElement::attach): Register for caption preferences change callbacks.
856         (WebCore::HTMLMediaElement::detach): Unregister for caption preferences change callbacks.
857         (WebCore::HTMLMediaElement::userPrefersCaptions): Return theme->userPrefersCaptions().
858         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Consider userPrefersCaptions().
859         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Move the code that marks all tracks as
860             un-configured to markCaptionAndSubtitleTracksAsUnconfigured so it can be reused.
861         (WebCore::HTMLMediaElement::captionPreferencesChanged): New, force a reevaluation of all text tracks.
862         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): New, code moved from 
863             setClosedCaptionsVisible
864         * html/HTMLMediaElement.h: Inherit from CaptionPreferencesChangedListener.
865
866         * html/shadow/MediaControlElements.cpp:
867         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Get rid of unnecessary member
868             variable. Get caption font scale from theme instead of hard coding.
869         * html/shadow/MediaControlElements.h:
870
871         * html/track/TextTrack.cpp:
872         (WebCore::TextTrack::TextTrack): Change attributes from String to AtomicString.
873         (WebCore::TextTrack::isValidKindKeyword): Ditto.
874         (WebCore::TextTrack::setKind): Ditto.
875         (WebCore::TextTrack::setMode): Ditto.
876         (WebCore::TextTrack::mode): Ditto.
877         * html/track/TextTrack.h:
878         (WebCore::TextTrack::create): Ditto.
879         (WebCore::TextTrack::kind): Ditto.
880         (WebCore::TextTrack::label): Ditto.
881         (WebCore::TextTrack::setLabel): Ditto.
882         (WebCore::TextTrack::language): Ditto.
883         (WebCore::TextTrack::setLanguage): Ditto.
884
885         * html/track/TextTrackCue.cpp:
886         (WebCore::TextTrackCueBox::TextTrackCueBox): Set the shadow pseudo id.
887         (WebCore::TextTrackCueBox::textTrackCueBoxShadowPseudoId): New, class method to return the 
888             shadow pseudo id so it can be used elsewhere.
889         (WebCore::TextTrackCueBox::shadowPseudoId): Call textTrackCueBoxShadowPseudoId.
890         (WebCore::TextTrackCue::pastNodesShadowPseudoId): New, class method to return the 
891             shadow pseudo id so it can be used elsewhere.
892         (WebCore::TextTrackCue::futureNodesShadowPseudoId): Ditto.
893         (WebCore::TextTrackCue::updateDisplayTree):
894         * html/track/TextTrackCue.h:
895
896         * page/CaptionUserPreferences.h: Added.
897         * page/CaptionUserPreferencesMac.h: Added.
898         * page/CaptionUserPreferencesMac.mm: Added.
899         (WebCore::userCaptionPreferencesChangedNotificationCallback):
900         (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac):
901         (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac):
902         (WebCore::CaptionUserPreferencesMac::userHasCaptionPreferences): New, passthrough to WKSI function.
903         (WebCore::CaptionUserPreferencesMac::userPrefersCaptions): Ditto.
904         (WebCore::CaptionUserPreferencesMac::captionsWindowColor): Return Color with user's caption window color preference.
905         (WebCore::CaptionUserPreferencesMac::captionsBackgroundColor): Return Color with user's caption 
906             background color preference.
907         (WebCore::CaptionUserPreferencesMac::captionsTextColor): Return Color with user's caption text color preference.
908         (WebCore::CaptionUserPreferencesMac::captionsEdgeColorForTextColor): Return Color for text edge effect.
909         (WebCore::CaptionUserPreferencesMac::cssPropertyWithTextEdgeColor): Return String with CSS to set a text-shadow
910             or webkit-text-stroke property.
911         (WebCore::CaptionUserPreferencesMac::cssColorProperty): Return a String with css to set a property 
912             with a color value.
913         (WebCore::CaptionUserPreferencesMac::captionsTextEdgeStyle): Return a String with css to style caption 
914             text with the user's preferred text edge stye.
915         (WebCore::CaptionUserPreferencesMac::captionsDefaultFont): Return a String with css to style caption
916             text with the user's preferred font.
917         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Return a String with css to style captions
918             with the user's preferred style.
919         (WebCore::CaptionUserPreferencesMac::captionFontSizeScale): Return the user's preferred caption font scale.
920         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Notify listeners of caption preference change.
921         (WebCore::CaptionUserPreferencesMac::registerForCaptionPreferencesChangedCallbacks): Add a caption preferences 
922             changes listener.
923         (WebCore::CaptionUserPreferencesMac::unregisterForCaptionPreferencesChangedCallbacks): Remove a caption preferences
924             changes listener.
925         (WebCore::CaptionUserPreferencesMac::updateCaptionStyleSheetOveride): New, if theme has a captions style sheet override,
926             inject it into the current page group, otherwise remove injected sheet.
927
928         * page/PageGroup.cpp:
929         (WebCore::PageGroup::captionPreferences):
930         (WebCore::PageGroup::registerForCaptionPreferencesChangedCallbacks): New, passthrough to platform specific function
931             of the same name.
932         (WebCore::PageGroup::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
933         (WebCore::PageGroup::userPrefersCaptions): Ditto.
934         (WebCore::PageGroup::userHasCaptionPreferences): Ditto.
935         (WebCore::PageGroup::captionFontSizeScale): Ditto.
936         * page/PageGroup.h:
937
938         * platform/mac/WebCoreSystemInterface.h: Updated.
939         * platform/mac/WebCoreSystemInterface.mm: Ditto.
940
941 2012-10-24  Vsevolod Vlasov  <vsevik@chromium.org>
942
943         Web Inspector: Introduce workspace provider as a content providing backend for project.
944         https://bugs.webkit.org/show_bug.cgi?id=100244
945
946         Reviewed by Pavel Feldman.
947
948         Introduced WorkspaceProvider interface as a content providing backend for project.
949         Added NetworkWorkspaceProvider as a network based (default) implementation.
950
951         * WebCore.gypi:
952         * WebCore.vcproj/WebCore.vcproj:
953         * inspector/compile-front-end.py:
954         * inspector/front-end/CompilerScriptMapping.js:
955         (WebInspector.CompilerScriptMapping):
956         * inspector/front-end/DebuggerScriptMapping.js:
957         (WebInspector.DebuggerScriptMapping):
958         * inspector/front-end/NetworkUISourceCodeProvider.js:
959         (WebInspector.NetworkUISourceCodeProvider):
960         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
961         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
962         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
963         * inspector/front-end/NetworkWorkspaceProvider.js: Added.
964         (WebInspector.NetworkWorkspaceProvider):
965         (WebInspector.NetworkWorkspaceProvider.prototype.requestFileContent):
966         (WebInspector.NetworkWorkspaceProvider.prototype.setFileContent):
967         (WebInspector.NetworkWorkspaceProvider.prototype.searchInFileContent):
968         (WebInspector.NetworkWorkspaceProvider.prototype.addFile):
969         (WebInspector.NetworkWorkspaceProvider.prototype.removeFile):
970         (WebInspector.NetworkWorkspaceProvider.prototype.reset):
971         * inspector/front-end/SASSSourceMapping.js:
972         (WebInspector.SASSSourceMapping):
973         (_bindUISourceCode):
974         * inspector/front-end/ScriptSnippetModel.js:
975         (WebInspector.ScriptSnippetModel):
976         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
977         * inspector/front-end/WebKit.qrc:
978         * inspector/front-end/Workspace.js:
979         (WebInspector.FileDescriptor):
980         (WebInspector.WorkspaceProvider):
981         (WebInspector.WorkspaceProvider.prototype.requestFileContent):
982         (WebInspector.WorkspaceProvider.prototype.searchInFileContent):
983         (WebInspector.WorkspaceProvider.prototype.addEventListener):
984         (WebInspector.WorkspaceProvider.prototype.removeEventListener):
985         (WebInspector.Project):
986         (WebInspector.Project.prototype.reset):
987         (WebInspector.Project.prototype._fileAdded):
988         (WebInspector.Project.prototype._fileRemoved):
989         (WebInspector.Project.prototype.requestFileContent):
990         (WebInspector.Project.prototype.searchInFileContent):
991         (WebInspector.Workspace):
992         (WebInspector.Workspace.prototype.addProject):
993         (WebInspector.Workspace.prototype.project):
994         * inspector/front-end/inspector.html:
995         * inspector/front-end/inspector.js:
996
997 2012-10-24  Nikita Vasilyev  <me@elv1s.ru>
998
999         Web Inspector: Styles pane: Don't select whole value when I select just a part
1000         https://bugs.webkit.org/show_bug.cgi?id=100242
1001
1002         Reviewed by Alexander Pavlov.
1003
1004         * inspector/front-end/StylesSidebarPane.js:
1005         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
1006         (WebInspector.StylePropertyTreeElement.prototype):
1007
1008 2012-10-24  Vsevolod Vlasov  <vsevik@chromium.org>
1009
1010         Web Inspector: UiSourceCode should rely on the workspace as a content provider.
1011         https://bugs.webkit.org/show_bug.cgi?id=100216
1012
1013         Reviewed by Pavel Feldman.
1014
1015         Workspace is now passed to UISourceCode to be used as a content provider.
1016         Content providers are now stored in the workspace/project.
1017         Next step would be to move content providers to workspace providers.
1018
1019         * inspector/front-end/BreakpointManager.js:
1020         (WebInspector.BreakpointManager.breakpointStorageId):
1021         * inspector/front-end/UISourceCode.js:
1022         (WebInspector.UISourceCode):
1023         (WebInspector.UISourceCode.prototype.contentType):
1024         (WebInspector.UISourceCode.prototype.requestContent):
1025         (WebInspector.UISourceCode.prototype.requestOriginalContent):
1026         (WebInspector.UISourceCode.prototype._commitContent):
1027         (WebInspector.UISourceCode.prototype.searchInContent):
1028         * inspector/front-end/Workspace.js:
1029         (WebInspector.WorkspaceController.prototype._mainFrameNavigated):
1030         (WebInspector.Project):
1031         (WebInspector.Project.prototype.addUISourceCode):
1032         (WebInspector.Project.prototype.removeUISourceCode):
1033         (WebInspector.Project.prototype.uiSourceCodes):
1034         (WebInspector.Project.prototype.requestFileContent):
1035         (WebInspector.Project.prototype.searchInFileContent):
1036         (WebInspector.Workspace):
1037         (WebInspector.Workspace.prototype.addTemporaryUISourceCode):
1038         (WebInspector.Workspace.prototype.removeTemporaryUISourceCode):
1039         (WebInspector.Workspace.prototype.reset):
1040
1041 2012-10-24  Zeno Albisser  <zeno@webkit.org>
1042
1043         Implement GraphicsSurface for Windows.
1044         https://bugs.webkit.org/show_bug.cgi?id=98147
1045
1046         Reviewed by Kenneth Rohde Christiansen.
1047
1048         * Target.pri:
1049             Include GraphicsSurfaceWin.cpp in SOURCES on Windows.
1050         * platform/graphics/surfaces/GraphicsSurface.h:
1051             Add typedef for PlatformGraphicsSurface on Windows.
1052         * platform/graphics/surfaces/GraphicsSurfaceToken.h:
1053             Add typedef for BufferHandle on Windows.
1054         (GraphicsSurfaceToken):
1055         * platform/graphics/surfaces/win/GraphicsSurfaceWin.cpp: Added.
1056             The GraphicsSurface implementation on Windows relies on the
1057             availability of ANGLE and the EGL_ANGLE_query_surface_pointer extension.
1058             For Qt this requirements are implicitly satisfied, when Qt is built
1059             on Windows and QT_CONFIG contains OpenGLES2.
1060             The GraphicsSurface then renders a given texture onto an offscreen
1061             pixel buffer surface, queries the surface pointer using the
1062             EGL_ANGLE_query_surface_pointer extension, and transmits the received
1063             surface pointer (share handle) over IPC.
1064             On the UIProcess side, the surface pointer can then be resolved
1065             using eglCreatePbufferFromClientBuffer.
1066         (WebCore):
1067         (WebCore::loadShader):
1068             Initialize the shaders needed for drawing onto the GraphicsSurface.
1069         (GraphicsSurfacePrivate):
1070         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1071             In case of the instance being on the WebProcess side,
1072             create an EGLContext that shares the texture objects with the provided
1073             share context. Also create two pixel buffer surfaces, one as front- and
1074             one as backbuffer.
1075             Query the surface pointers for the pixel buffer surfaces and initialize
1076             the GraphicsSurfaceToken that can be passed over IPC later.
1077         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1078             Release all aquired resources and destroy the pixel buffer surfaces.
1079             Also close the EGL-Display connection.
1080         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
1081             Make the belonging context current on the back buffer surface
1082             and use drawTexture() to draw the provided texture onto the GraphicsSurface.
1083         (WebCore::GraphicsSurfacePrivate::makeCurrent):
1084             Save the previously current context, then make the context belonging
1085             to the GraphicsSurface current.
1086         (WebCore::GraphicsSurfacePrivate::doneCurrent):
1087             Restore the context that was current before calling makeCurrent().
1088         (WebCore::GraphicsSurfacePrivate::swapBuffers):
1089             Swap front and back buffer surfaces and handles.
1090         (WebCore::GraphicsSurfacePrivate::token):
1091         (WebCore::GraphicsSurfacePrivate::frontBufferTextureID):
1092             This function is meant to be called from the UIProcess side.
1093             If no front buffer surface has been created before for the current
1094             front buffer handle, one will be created.
1095             Then eglBindTexImage will be used to actually bind the current
1096             front buffer surface to a texture as a source for drawing.
1097         (WebCore::GraphicsSurfacePrivate::initialFrontBufferShareHandle):
1098         (WebCore::GraphicsSurfacePrivate::frontBufferShareHandle):
1099         (WebCore::GraphicsSurfacePrivate::backBufferShareHandle):
1100         (WebCore::GraphicsSurfacePrivate::releaseFrontBufferTexture):
1101             Free the resources related to the front buffer surface.
1102             On the UIProcess side we never actually bind the back buffer.
1103         (WebCore::GraphicsSurfacePrivate::initializeShaderProgram):
1104             Initialize and link the shader programs necessary for drawing
1105             onto the GraphicsSurface.
1106         (WebCore::GraphicsSurfacePrivate::createSurfaceFromShareHandle):
1107             Creates a single pixel buffer surface from a share Handle.
1108             This function will be called on the UIProcess side,
1109             for the front buffer handle, whenever the buffers have been swapped.
1110         (WebCore::GraphicsSurfacePrivate::drawTexture):
1111             The WebProcess uses this function to draw a given
1112             texture onto the GraphicsSurface's back buffer.
1113         (WebCore::GraphicsSurface::platformExport):
1114         (WebCore::GraphicsSurface::platformGetTextureID):
1115         (WebCore::GraphicsSurface::platformCopyToGLTexture):
1116         (WebCore::GraphicsSurface::platformCopyFromTexture):
1117         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
1118             Uses TextureMapperGL::drawTexture() to draw the front buffer texture
1119             to the TextureMapper on the UIProcess side.
1120         (WebCore::GraphicsSurface::platformFrontBuffer):
1121         (WebCore::GraphicsSurface::platformSwapBuffers):
1122         (WebCore::GraphicsSurface::platformCreate):
1123         (WebCore::GraphicsSurface::platformImport):
1124         (WebCore::GraphicsSurface::platformLock):
1125         (WebCore::GraphicsSurface::platformUnlock):
1126         (WebCore::GraphicsSurface::platformDestroy):
1127
1128 2012-09-27  Yury Semikhatsky  <yurys@chromium.org>
1129
1130         Web Inspector: provide memory instrumentation for ListHashSet
1131         https://bugs.webkit.org/show_bug.cgi?id=97786
1132
1133         Reviewed by Vsevolod Vlasov.
1134
1135         Switched existing usages of addListHashSet to the generic instrumentation mechanism
1136         as it should work just just fine now that there is a memory instrumentation of
1137         ListHashSet.
1138
1139         * dom/DocumentEventQueue.cpp:
1140         * dom/DocumentStyleSheetCollection.cpp:
1141         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1142         * loader/cache/CachedResourceLoader.cpp:
1143         (WebCore::CachedResourceLoader::reportMemoryUsage):
1144
1145 2012-10-24  Charles Wei  <charles.wei@torchmobile.com.cn>
1146
1147         [BlackBerry] Credentials not re-used for a redirected request to the same domain
1148         https://bugs.webkit.org/show_bug.cgi?id=100193
1149
1150         Reviewed by George Staikos.
1151
1152         We should store the credentials in the redirection response handler, if the request is challenged.
1153         Because the redirect response suggests the authentication succeeds. 
1154
1155         Test: http://browsertest01.rim.net/authbasic
1156
1157         * platform/network/blackberry/NetworkJob.cpp:
1158         (WebCore::NetworkJob::handleRedirect):
1159
1160 2012-10-24  Alexander Pavlov  <apavlov@chromium.org>
1161
1162         Web Inspector: Implement CSS reload upon related SASS resource saving
1163         https://bugs.webkit.org/show_bug.cgi?id=98024
1164
1165         Reviewed by Vsevolod Vlasov.
1166
1167         SASS-generated debug info in CSS is parsed to find out which SASS files contributed to this stylesheet.
1168         Upon SASS file save in the Sources panel, all affected external CSS stylesheets are reloaded to update
1169         the page styles (presuming that SASS is running in the "watch" mode during the development cycle).
1170
1171         * English.lproj/localizedStrings.js:
1172         * inspector/front-end/SASSSourceMapping.js:
1173         (WebInspector.SASSSourceMapping):
1174         (WebInspector.SASSSourceMapping.prototype._fileSaveFinished.callback):
1175         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
1176         (_bindUISourceCode):
1177         (_addCSSURLforSASSURL):
1178         * inspector/front-end/Settings.js:
1179         * inspector/front-end/SettingsScreen.js:
1180         (WebInspector.GenericSettingsTab):
1181
1182 2012-10-23  Yury Semikhatsky  <yurys@chromium.org>
1183
1184         Memory instrumentation: don't count agent-specific front-ends separately
1185         https://bugs.webkit.org/show_bug.cgi?id=100087
1186
1187         Reviewed by Alexander Pavlov.
1188
1189         Pointers to domain-specific inspector front-end interfaces are reported as
1190         weak pointers instead of members to avoid double-counting.
1191
1192         Test by comparing set of reported instrumented objects with the set of objects
1193         allocated by tcmalloc.
1194
1195         * inspector/InspectorDOMStorageAgent.cpp:
1196         (WebCore::InspectorDOMStorageAgent::reportMemoryUsage):
1197         * inspector/InspectorDOMStorageResource.cpp:
1198         (WebCore::InspectorDOMStorageResource::reportMemoryUsage):
1199         * inspector/InspectorProfilerAgent.cpp:
1200         (WebCore::InspectorProfilerAgent::reportMemoryUsage):
1201
1202 2012-10-23  Christophe Dumez  <christophe.dumez@intel.com>
1203
1204         Regression(r132303) Broke debug build when SHADOW_DOM is enabled but STYLE_SCOPED is disabled
1205         https://bugs.webkit.org/show_bug.cgi?id=100203
1206
1207         Unreviewed Build fix.
1208
1209         Fix compilation error in StyleResolver.h when SHADOW_DOM flag is
1210         set and STYLE_SCOPED is not.
1211
1212         No new tests, no behavior change.
1213
1214         * css/StyleResolver.h:
1215         (WebCore::StyleResolver::ensureScopeResolver):
1216
1217 2012-10-23  Andreas Kling  <kling@webkit.org>
1218
1219         Remove specialized hash traits for GlyphPages.
1220         <http://webkit.org/b/100185>
1221
1222         Reviewed by Dan Bernstein.
1223
1224         Now that the default minimum table size has been lowered for all tables, there's no need
1225         for this specialization anymore.
1226
1227         * platform/graphics/FontFallbackList.h:
1228         (FontFallbackList):
1229
1230 2012-10-23  Kent Tamura  <tkent@chromium.org>
1231
1232         Multiple fields input UI: Don't use CSS properties for physical direction
1233         https://bugs.webkit.org/show_bug.cgi?id=100195
1234
1235         Reviewed by Kentaro Hara.
1236
1237         CSS declarations such as "padding: 0 0 0 1px;" "margin-left: 0.2em;" are
1238         not direction-neutral, and makes unexpected appearance in RTL. We should
1239         use -webkit-padding-start or -webkit-margin-start.
1240
1241         No new tests. Covered by date-multiple-fields-appearance-l10n.html and
1242         month-multiple-fields-appearance-l10n.html
1243
1244         * css/html.css:
1245         (input[type="date"]): Use padding:0 and -webkit-padding-start:1px;
1246         (input[type="datetime"]): Ditto.
1247         (input[type="datetime-local"]): Ditto.
1248         (input[type="month"]): Ditto.
1249         (input[type="time"]): Ditto.
1250         (input[type="week"]): Ditto.
1251         (input[type="week"]::-webkit-inner-spin-button):
1252         Use -webkit-margin-start. Also use an integral pixel size instead of
1253         avoid a fractional relative size to avoid subpixel layout rounding.
1254
1255 2012-10-23  Dan Bernstein  <mitz@apple.com>
1256
1257         The font cache evicts inactive font data too aggressively when not under memory pressure
1258         https://bugs.webkit.org/show_bug.cgi?id=100194
1259
1260         Reviewed by Sam Weinig.
1261
1262         Increasing the number of inactive font data objects the cache may hold increases the hit
1263         rate, leading to improved page load performance. When memory pressure is detected,
1264         MemoryPressureHandler evicts all inactive objects, regardless of the limits we are
1265         increasing here.
1266
1267         * platform/graphics/FontCache.cpp:
1268         (WebCore): Increased the maximum number of inactive font data objects in the cache from 50
1269         to 225, and the number of objects to evict once the limit is met from 20 to 25.
1270
1271 2012-10-23  Takashi Sakamoto  <tasak@google.com>
1272
1273         [Shadow DOM] Needs @host rule for ShadowDOM styling
1274         https://bugs.webkit.org/show_bug.cgi?id=88606
1275
1276         Reviewed by Hajime Morita.
1277
1278         Implemented @host-@rules according to the shadow dom spec:
1279         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#host-at-rule
1280         The design doc is:
1281         https://docs.google.com/document/d/1P2yorchF8lci2sccr-mVSRf2dtvjKeiuyQWzCB2bEA8/edit
1282
1283         Test: fast/dom/shadow/athost-atrules.html
1284
1285         * css/CSSGrammar.y.in:
1286         Added rules for parsing @host @-rules.
1287         * css/CSSParser.cpp:
1288         (WebCore::CSSParser::detectAtToken):
1289         Added a new token "@host".
1290         (WebCore::CSSParser::createHostRule):
1291         Added a new method to create an @host @-rule, which is invoked from
1292         (WebCore):
1293         * css/CSSParser.h:
1294         Added a declaration of the above new method: createHostRule.
1295         * css/CSSPropertySourceData.h:
1296         Added HOST_RULE to enum Type.
1297         * css/RuleSet.cpp:
1298         (WebCore::RuleData::RuleData):
1299         Modified multiple bool arguments into one argument. Now it
1300         uses combinations of values from enum AddRuleFlags.
1301         (WebCore::RuleSet::addRule):
1302         (WebCore::RuleSet::addRegionRule):
1303         (WebCore::RuleSet::addStyleRule):
1304         Updated according to the RuleData's change.
1305         Modified to Invoke increaseSpecificity if the given rule is @host
1306         @-rule.
1307         (WebCore::RuleSet::addRulesFromSheet):
1308         Invoked addHostRule if the given rule is @host @-rule.
1309         * css/RuleSet.h:
1310         (RuleData):
1311         (WebCore::RuleData::increaseSpecificity):
1312         Added a new method to increase selector's specificity. This method is
1313         used to make @host @-rules' specificity larger than normal author
1314         rules' specificity.
1315         (RuleSet):
1316         * css/StyleResolver.cpp:
1317         (WebCore::makeRuleSet):
1318         (WebCore::StyleResolver::addHostRule):
1319         A wrapper method to invoke StyleScopeResolver::addHostRule. The method
1320         is used to make only StyleResolver know an implementation detail about
1321         class StyleScopeResolver.
1322         (WebCore::StyleResolver::appendAuthorStylesheets):
1323         Updated according to the RuleData's change.
1324         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
1325         A new method to find matched host rules when an element is given.
1326         This method invokes
1327         StyleScopeResolver::styleSharingCandidateMatchesHostRules to find
1328         matched host rules.
1329         (WebCore):
1330         (WebCore::StyleResolver::matchHostRules):
1331         A new method to find matched host rules when an element is given.
1332         This method invokes StyleScopeResolver::matchHostRules to find
1333         matched host rules.
1334         (WebCore::StyleResolver::matchScopedAuthorRules):
1335         Modified to invoke matchHostRules.
1336         (WebCore::StyleResolver::locateSharedStyle):
1337         Disable sibling style cache if the given element is a shadow host and
1338         any @host @-rules are applied to the element.
1339         * css/StyleResolver.h:
1340         (WebCore::StyleResolver::ensureScopeResolver):
1341         If no scopeResolver is created, create and return the instance.
1342         If created, just return the instance.
1343         (StyleResolver):
1344         * css/StyleRule.cpp:
1345         (WebCore::StyleRuleBase::reportMemoryUsage):
1346         (WebCore::StyleRuleBase::destroy):
1347         (WebCore::StyleRuleBase::copy):
1348         (WebCore::StyleRuleBase::createCSSOMWrapper):
1349         (WebCore::StyleRuleHost::StyleRuleHost):
1350         Implemented class StyleRuleHost. The class is almost the same as
1351         StyleRuleBlock except type.
1352         (WebCore):
1353         * css/StyleRule.h:
1354         (WebCore::StyleRuleBase::isHostRule):
1355         (StyleRuleHost):
1356         (WebCore::StyleRuleHost::create):
1357         (WebCore::StyleRuleHost::copy):
1358         (WebCore):
1359         * css/StyleScopeResolver.cpp:
1360         (WebCore::StyleScopeResolver::ensureAtHostRuleSetFor):
1361         A new method to create a new RuleSet for the given shadow root.
1362         (WebCore):
1363         (WebCore::StyleScopeResolver::atHostRuleSetFor):
1364         A new private inline method to obtain @host @-rules declared in
1365         the given shadow root.
1366         (WebCore::StyleScopeResolver::addHostRule):
1367         Added a new method to register @host @-rules with shadow roots.
1368         (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
1369         A new method to find whether any @host @-rules are applied to
1370         the given host element.
1371         (WebCore::StyleScopeResolver::matchHostRules):
1372         A new method to find matched rules for the given host element.
1373         (WebCore::StyleScopeResolver::reportMemoryUsage):
1374         * css/StyleScopeResolver.h:
1375         (WebCore):
1376         (StyleScopeResolver):
1377         * css/StyleSheetContents.cpp:
1378         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1379
1380 2012-10-23  Andreas Kling  <kling@webkit.org>
1381
1382         REGRESSION(r130643): ASSERTION FAILED: result.iterator != end() below PluginDatabase::add
1383         <http://webkit.org/b/100065>
1384
1385         Reviewed by Anders Carlsson.
1386
1387         Restore the pre-r130643 hash table size for PluginDatabase to prevent these easily reproducible
1388         collisions. This will need a proper fix at some point.
1389
1390         * plugins/PluginDatabase.h:
1391         * plugins/PluginPackage.h:
1392         (PluginPackageHashTraits):
1393
1394 2012-10-23  Simon Fraser  <simon.fraser@apple.com>
1395
1396         Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
1397         https://bugs.webkit.org/show_bug.cgi?id=100159
1398
1399         Reviewed by Tim Horton.
1400
1401         Add a LAYER_TREE_INCLUDES_PAGE_TILE_CACHE flag for layerTreeAsText(), and plumb it
1402         through to GraphicsLayerCA, which dumps the TiledBacking tile coverage rect.
1403
1404         Test: platform/mac/tiled-drawing/use-tiled-drawing.html
1405
1406         * page/Frame.h:
1407         * platform/graphics/GraphicsLayer.cpp:
1408         (showGraphicsLayerTree):
1409         * platform/graphics/GraphicsLayer.h:
1410         (WebCore::GraphicsLayer::tiledBacking):
1411         * platform/graphics/TiledBacking.h:
1412         * platform/graphics/ca/GraphicsLayerCA.cpp:
1413         (WebCore::GraphicsLayerCA::tiledBacking):
1414         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1415         * platform/graphics/ca/GraphicsLayerCA.h:
1416         (GraphicsLayerCA):
1417         * platform/graphics/ca/mac/TileCache.h:
1418         (WebCore::TileCache::tileCoverageRect):
1419         (TileCache):
1420         * platform/graphics/ca/mac/TileCache.mm:
1421         (WebCore::TileCache::computeTileCoverageRect):
1422         (WebCore::TileCache::revalidateTiles):
1423         * rendering/RenderLayerCompositor.cpp:
1424         (WebCore::RenderLayerCompositor::layerTreeAsText):
1425         * testing/Internals.cpp:
1426         (WebCore::Internals::layerTreeAsText):
1427         * testing/Internals.h:
1428         * testing/Internals.idl:
1429
1430 2012-10-23  Simon Fraser  <simon.fraser@apple.com>
1431
1432         Flush pending GraphicsLayer changes when reattaching compositing layers if necessary
1433         https://bugs.webkit.org/show_bug.cgi?id=100187
1434         <rdar://problem/12546770>
1435
1436         Reviewed by Dan Bernstein.
1437
1438         Fix a regression from r131940. That revision changed RenderLayerCompositor::flushPendingLayerChanges()
1439         to bail if the root layer is unattached, which indicates that we're in the page cache, or in a
1440         background tab. However, that dropped the layer flush on the floor, so that any subsequent changes
1441         to GraphicsLayerCAs would just pile up and never get flushed. This was most evident on pages
1442         that require frequent flushing, such as those running animated GIFs.
1443         
1444         Fix by setting a flag in flushPendingLayerChanges() if we're unattached. Consult the flag
1445         when re-attaching the root layer, and if it's set, flush the GraphicsLayers.
1446         
1447         Not testable because we can't test detaching and re-adding web views in DRT/WTR.
1448
1449         * rendering/RenderLayerCompositor.cpp:
1450         (WebCore::RenderLayerCompositor::RenderLayerCompositor): Initialize m_shouldFlushOnReattach to false.
1451         (WebCore::RenderLayerCompositor::flushPendingLayerChanges): If the root layer attachment
1452         is RootLayerUnattached, set the m_shouldFlushOnReattach flag before returning.
1453         (WebCore::RenderLayerCompositor::attachRootLayer): If m_shouldFlushOnReattach, flush the layers,
1454         saying that we're the flush root.
1455         * rendering/RenderLayerCompositor.h:
1456         (RenderLayerCompositor): Add m_shouldFlushOnReattach flag.
1457
1458 2012-10-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1459
1460         Unreviewed, rolling out r132276.
1461         http://trac.webkit.org/changeset/132276
1462         https://bugs.webkit.org/show_bug.cgi?id=100189
1463
1464         It broke the Qt-WK2 build intentionally (Requested by
1465         Ossy_night on #webkit).
1466
1467         * page/Frame.h:
1468         * platform/graphics/GraphicsLayer.cpp:
1469         (showGraphicsLayerTree):
1470         * platform/graphics/GraphicsLayer.h:
1471         (WebCore::GraphicsLayer::tiledBacking):
1472         * platform/graphics/TiledBacking.h:
1473         * platform/graphics/ca/GraphicsLayerCA.cpp:
1474         (WebCore::GraphicsLayerCA::tiledBacking):
1475         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1476         * platform/graphics/ca/GraphicsLayerCA.h:
1477         (GraphicsLayerCA):
1478         * platform/graphics/ca/mac/TileCache.h:
1479         * platform/graphics/ca/mac/TileCache.mm:
1480         (WebCore::TileCache::tileCoverageRect):
1481         (WebCore::TileCache::revalidateTiles):
1482         * rendering/RenderLayerCompositor.cpp:
1483         (WebCore::RenderLayerCompositor::layerTreeAsText):
1484         * testing/Internals.cpp:
1485         (WebCore::Internals::layerTreeAsText):
1486         * testing/Internals.h:
1487         * testing/Internals.idl:
1488
1489 2012-10-23  Philip Rogers  <pdr@google.com>
1490
1491         Add extra check for data() in PageSerializer.
1492         https://bugs.webkit.org/show_bug.cgi?id=99102
1493
1494         Reviewed by Eric Seidel.
1495
1496         The image returned from imageForRenderer() does not contain the raw SVG data
1497         so this patch adds a check for image->image()->data() before writing SVG
1498         in PageSerializer::addImageToResources.
1499
1500         Covered by existing test WebPageNewSerializeTest.SVGImageDontCrash.
1501
1502         * page/PageSerializer.cpp:
1503         (WebCore::PageSerializer::addImageToResources):
1504
1505 2012-10-23  Kent Tamura  <tkent@chromium.org>
1506
1507         Move appendAsLDMLLiteral in LocaleWin.cpp to a common place
1508         https://bugs.webkit.org/show_bug.cgi?id=100129
1509
1510         Reviewed by Kentaro Hara.
1511
1512         We're going to use appendAsLDMLLiteral in other code, and it is
1513         related to DateTimeFormat class.  So we move it to DateTimeFormat
1514         class as quoteAndAppendLiteral.
1515
1516         No new tests because of no behavior change.
1517
1518         * platform/text/DateTimeFormat.cpp:
1519         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
1520         Moved from LocaleWin.cpp
1521         * platform/text/DateTimeFormat.h:
1522         Declare StringBuilder by wtf/Forward.h. It also declares String.
1523         (DateTimeFormat): Declare quoteAndAppendLiteral.
1524         * platform/text/LocaleWin.cpp:
1525         (WebCore): Move appendLDMLLiteral to DateTimeFormat.
1526         (WebCore::convertWindowsDateFormatToLDML):
1527         Follow the moving.
1528
1529 2012-10-23  Kent Tamura  <tkent@chromium.org>
1530
1531         REGRESSION(r131421): Text baseline is not aligned in some locales
1532         https://bugs.webkit.org/show_bug.cgi?id=100088
1533
1534         Reviewed by Hajime Morita.
1535
1536         Before this patch, the element with ::-webkit-datetime-edit had
1537         -webkit-align-items:center. It was incorrect at all because it
1538         ignores baselines of each of inner fields. We need to change it to
1539         -webkit-align-items:baseline, or stop using -webkit-flex.
1540
1541         However -webkit-align-items:baseline doesn't work because a spin
1542         button element in the element doesn't have the baseline. If we
1543         specified -webkit-align-items:baseline, the spin button would
1544         shift up.
1545
1546         So, we change the element structure for multiple fields input
1547         elements. Before this patch, the structure was:
1548
1549         input
1550           |
1551            - ::-webkit-date-and-time-container (flex cotainer)
1552              |
1553              |- ::-webkit-datetime-edit (has flexibility in date-and-time-container, also this is a flex container)
1554              |  |- ::-webkit-datetime-edit-foo
1555              |  |      :
1556              |  |
1557              |  |- ::-webkit-date-time-edit-gap  (has flexibility in datetime-edit)
1558              |   - ::-webkit-inne-spin-button
1559               - ::-webkit-calendar-picker-indicator
1560
1561         After the patch, the structure will be:
1562
1563         input
1564           |
1565            - ::-webkit-date-and-time-container (flexible box)
1566              |
1567              |- ::-webkit-datetime-edit (has flexibility in date-and-time-container)
1568              |  |- ::-webkit-datetime-edit-foo
1569              |  |      :
1570              |  |
1571              |
1572              |- ::-webkit-inne-spin-button
1573               - ::-webkit-calendar-picker-indicator
1574
1575         Because the spin button owner is date-and-time-container, we don't
1576         need to make the datetime-edit element a flex container.
1577
1578         Also, we had rounding error by subpixel layout. To avoid it, we
1579         stop using fractional paddings.
1580
1581         In order to implement this, we need to change the SpinButtonOwner
1582         interface provider from DateTimeEditElement to
1583         BaseMultipleFieldsDateAndTimeInputType.
1584
1585         No new tests. Covered by month-multiple-fields-appearance-l10n.html.
1586
1587         * css/html.css:
1588         (input::-webkit-datetime-edit): Stop making this a flex
1589         container. Inner fields in this use the single baseline.
1590         (input::-webkit-datetime-edit-ampm-field):
1591         Don't use fractional paddings to avoid rounding erros of subpixel
1592         layout.  Use integral margin instead to avoid overwrap of focus
1593         ring and background-color of the field.
1594         (input::-webkit-datetime-edit-day-field): Ditto.
1595         (input::-webkit-datetime-edit-hour-field): Ditto.
1596         (input::-webkit-datetime-edit-millisecond-field): Ditto.
1597         (input::-webkit-datetime-edit-minute-field): Ditto.
1598         (input::-webkit-datetime-edit-month-field): Ditto.
1599         (input::-webkit-datetime-edit-second-field): Ditto.
1600         (input::-webkit-datetime-edit-week-field): Ditto.
1601         (input::-webkit-datetime-edit-year-field): Ditto.
1602         (input::-webkit-date-and-time-container): Ditto.
1603
1604         * html/BaseMultipleFieldsDateAndTimeInputType.h:
1605         (BaseMultipleFieldsDateAndTimeInputType): Overrides
1606         SpinButtonOwner functions, and add m_spinButtonElement.
1607         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
1608         (WebCore::BaseMultipleFieldsDateAndTimeInputType::focusAndSelectSpinButtonOwner):
1609         Just delegate to DateTimeEditElement::focusIfNoFocus.
1610         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents):
1611         Moved from DateTimeEditElement::shouldSpinButtonRespondToMouseEvents.
1612         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToWheelEvents):
1613         Moved from DateTimeEditElement::shouldSpinButtonRespondToWheelEvents.
1614         (WebCore::BaseMultipleFieldsDateAndTimeInputType::spinButtonStepDown):
1615         Delegate to DateTimeEditElement::stepDown.
1616         (WebCore::BaseMultipleFieldsDateAndTimeInputType::spinButtonStepUp):
1617         Delegate to DateTimeEditElement::stepUp.
1618         (WebCore::BaseMultipleFieldsDateAndTimeInputType::BaseMultipleFieldsDateAndTimeInputType):
1619         Initialize m_spinButtonElement.
1620         (WebCore::BaseMultipleFieldsDateAndTimeInputType::~BaseMultipleFieldsDateAndTimeInputType):
1621         Reset SpinButtonOwner for m_spinButtonElement like the old code of ~DateTimeEditElement.
1622         (WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
1623         Put a SpinButtonElement between the DateTimeEditElement and the PickerIndicatorElement.
1624         (WebCore::BaseMultipleFieldsDateAndTimeInputType::forwardEvent):
1625         Take care of SpinButtonElement.
1626         (WebCore::BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged):
1627         Release capture of SpinButtonElement. This corresponds to the old
1628         code of DateTimeEditElement::updateUIState.
1629         (WebCore::BaseMultipleFieldsDateAndTimeInputType::readonlyAttributeChanged): Ditto.
1630
1631         * html/TextFieldInputType.h:
1632         Make SpinButtonElement::SpinButtonOwner protected to allow overriding.
1633
1634         * html/shadow/DateTimeEditElement.h:
1635         (DateTimeEditElement): Remove SpniButtonOwner implementation,
1636         m_spinButton, and rename some functions.
1637         * html/shadow/DateTimeEditElement.cpp:
1638         (WebCore::DateTimeEditElement::DateTimeEditElement):
1639         Remove m_spinButton.
1640         (WebCore::DateTimeEditElement::~DateTimeEditElement): Ditto.
1641         (WebCore::DateTimeEditElement::focusIfNoFocus):
1642         Renamed from focusAndSelectSpinButtonOwner. This is called
1643         BaseMultipleFieldsDateAndTimeInputType::focusAndSelectSpinButtonOwner.
1644         (WebCore::DateTimeEditElement::layout):
1645         Remove creation code for -webkit-datetime-edit-gap and SpinButtonElement.
1646         (WebCore::DateTimeEditElement::defaultEventHandler):
1647         Move the code for m_spinButton to
1648         BaseMultipleFieldsDateAndTimeInputType::forwardEvent.
1649         (WebCore::DateTimeEditElement::hasFocusedField): A helper for
1650         BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToWheelEvents.
1651         (WebCore::DateTimeEditElement::stepDown): A helper for
1652         BaseMultipleFieldsDateAndTimeInputType::spinButtonStepDown.
1653         (WebCore::DateTimeEditElement::stepUp): A helper for
1654         BaseMultipleFieldsDateAndTimeInputType::spinButtonStepUp.
1655         (WebCore::DateTimeEditElement::updateUIState): Move the code to
1656         BaseMultipleFieldsDateAndTimeInputType::disabledAttributeChanged
1657         and readonlyAttributeChanged.
1658
1659 2012-10-23  Andreas Kling  <kling@webkit.org>
1660
1661         Shrink immutable ElementAttributeData and StylePropertySet by one pointer each.
1662         <http://webkit.org/b/100123>
1663
1664         Reviewed by Anders Carlsson.
1665
1666         Remove one pointer of unintentional padding in the immutable versions of these objects.
1667         583kB progression on Membuster3.
1668
1669         * css/StylePropertySet.cpp:
1670         (WebCore::immutableStylePropertySetSize):
1671         * dom/ElementAttributeData.cpp:
1672         (WebCore::immutableElementAttributeDataSize):
1673
1674 2012-10-23  Nate Chapin  <japhet@chromium.org>
1675
1676         Crash in WebCore::SubresourceLoader::willSendRequest.
1677         https://bugs.webkit.org/show_bug.cgi?id=100147
1678
1679         Reviewed by Abhishek Arya.
1680
1681         No new tests. There is a test case that should cover this, but it doesn't
1682         work correctly on many platforms due to its use of testRunner.addURLToRedirect().
1683         See http/tests/loading/cross-origin-XHR-willLoadRequest.html.
1684         Tested manually on http://www.nick.co.uk/shows/spongebob
1685
1686         * loader/SubresourceLoader.cpp:
1687         (WebCore::SubresourceLoader::willSendRequest):
1688
1689 2012-10-23  Martin Robinson  <mrobinson@igalia.com>
1690
1691         [GTK][Soup] Implement the default authentication dialog via WebCoreSupport
1692         https://bugs.webkit.org/show_bug.cgi?id=99351
1693
1694         Reviewed by Carlos Garcia Campos.
1695
1696         Instead of connecting to the SoupSession::authenticate signal in the API layer
1697         via a SoupSessionFeature, route the message through the typical WebCore authentication
1698         mechanism. This is a step on the path to having full-blown support for authentication
1699         in the API allowing for custom authentication dialogs and behavior in clients.
1700
1701         No new tests. This should not change behavior.
1702
1703         * GNUmakefile.list.am: Add the new implementation file for the AuthenticationChallenge.
1704         * loader/ResourceLoader.cpp:
1705         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Include GTK+ here as well.
1706         * platform/gtk/GtkAuthenticationDialog.cpp: Instead of carrying a raw pointer to a SoupAuth
1707         carry a GRefPtr which will allow the dialog to be used even after the AuthenticationChallenge
1708         is destroyed.
1709         * platform/gtk/GtkAuthenticationDialog.h: ditto.
1710         * platform/network/ResourceHandle.h: Add a didReceiveAuthenticationChallenge method.
1711         * platform/network/ResourceHandleInternal.h:
1712         (ResourceHandleInternal): Remove the getter for the initiating page ID.
1713         * platform/network/soup/AuthenticationChallenge.h: Added an implementation of AuthenticationChallenge
1714         that takes a bit of data from the handle including SoupMessage, SoupAuth, and SoupSession.
1715         * platform/network/soup/AuthenticationChallengeSoup.cpp: Added. Ditto.
1716         * platform/network/soup/ResourceError.h:
1717         (ResourceError): Added a factory for authentication errors.
1718         * platform/network/soup/ResourceErrorSoup.cpp: Ditto.
1719         * platform/network/soup/ResourceHandleSoup.cpp:
1720         (WebCore::setSoupRequestInitiaingPageID): Just get the page directly from the NetworkingContext.
1721         (WebCore::createSoupMessageForHandleAndRequest): Always set the "handle" data on the message.
1722         It's always used now.
1723         (WebCore::ResourceHandle::start): Get the initiating page ID directly from the NetworkingContext.
1724         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Added this method which routes
1725         the authentication challenge to the client.
1726         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential): Added a stub for this method.
1727         (WebCore::ResourceHandle::loadResourceSynchronously): Don't pass the session to the loader.
1728         (WebCore::authenicateCallback): Added.
1729         (WebCore::ResourceHandle::defaultSession): Connect the authenticate callback.
1730
1731 2012-10-23  Adam Barth  <abarth@webkit.org>
1732
1733         [V8] Simplify GCEpilogueVisitor along the same lines as GCPrologueVisitor
1734         https://bugs.webkit.org/show_bug.cgi?id=100157
1735
1736         Reviewed by Eric Seidel.
1737
1738         This patch removes the traits template parameter from GCEpilogueVisitor
1739         and makes it mirror GCPrologueVisitor again.
1740
1741         * bindings/v8/V8GCController.cpp:
1742         (WebCore):
1743         (ActiveDOMObjectEpilogueVisitor):
1744         (WebCore::ActiveDOMObjectEpilogueVisitor::ActiveDOMObjectEpilogueVisitor):
1745         (WebCore::ActiveDOMObjectEpilogueVisitor::visitDOMWrapper):
1746         (WebCore::V8GCController::majorGCEpilogue):
1747
1748 2012-10-23  Varun Jain  <varunjain@chromium.org>
1749
1750         Context menu generated from touch gestures on textareas has
1751         context of the cursor position instead of the position where the event occurs.
1752         https://bugs.webkit.org/show_bug.cgi?id=99520
1753
1754         Reviewed by Kenneth Rohde Christiansen.
1755
1756         Send a synthetic mouse down event for context menu-summoning-gesture events so
1757         that textareas can correctly set cursors before receiving the context menu event.
1758
1759         Test: fast/events/touch/gesture/right-click-gestures-set-cursor-at-correct-position.html
1760
1761         * page/EventHandler.cpp:
1762         (WebCore::EventHandler::handleGestureEvent):
1763         (WebCore::EventHandler::handleGestureTwoFingerTap):
1764         (WebCore):
1765         (WebCore::EventHandler::sendContextMenuEventForGesture):
1766         * page/EventHandler.h:
1767         (EventHandler):
1768
1769 2012-10-23  Andy Estes  <aestes@apple.com>
1770
1771         [WebKit2 API] Add properties to get textRects from a WKDOMRange or WKDOMNode
1772         https://bugs.webkit.org/show_bug.cgi?id=100162
1773
1774         Reviewed by Sam Weinig.
1775
1776         * WebCore.exp.in: Exported symbols needed by WebKit2.
1777         * bindings/objc/DOM.mm:
1778         (-[DOMNode textRects]): Moved some logic into Node::textRects()
1779         (everything but the call to updateLayoutIgnorePendingStylesheets()).
1780         * dom/Node.cpp:
1781         (WebCore::Node::textRects):
1782         * dom/Node.h:
1783
1784 2012-10-23  Adam Barth  <abarth@webkit.org>
1785
1786         [V8] Remove unused function from DOM wrapper visitor
1787         https://bugs.webkit.org/show_bug.cgi?id=100163
1788
1789         Reviewed by Eric Seidel.
1790
1791         No one overrides these virtual functions. They were added in
1792         http://trac.webkit.org/changeset/73491, but we don't use them in the GC
1793         controller anymore.
1794
1795         * bindings/v8/V8DOMMap.h:
1796         (WebCore::WeakReferenceMap::visit):
1797
1798 2012-10-23  Aaron Colwell  <acolwell@chromium.org>
1799
1800         Clear m_mediaSource reference when the MediaSource is closed
1801         https://bugs.webkit.org/show_bug.cgi?id=100047
1802
1803         Reviewed by Eric Carlson.
1804
1805         The m_mediaSource object shouldn't be accessed after the object
1806         transitions to closed so this change simply clears the reference
1807         when that transition happens.
1808
1809         No new tests because the change isn't visible to JavaScript.
1810
1811         * html/HTMLMediaElement.cpp:
1812         (WebCore::HTMLMediaElement::loadResource): Removed a closed transition that is actually dead code.
1813         (WebCore::HTMLMediaElement::setSourceState): Clear the m_mediaSource reference on closed transition.
1814
1815 2012-10-23  Simon Fraser  <simon.fraser@apple.com>
1816
1817         Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
1818         https://bugs.webkit.org/show_bug.cgi?id=100159
1819
1820         Reviewed by Tim Horton.
1821
1822         Add a LAYER_TREE_INCLUDES_PAGE_TILE_CACHE flag for layerTreeAsText(), and plumb it
1823         through to GraphicsLayerCA, which dumps the TiledBacking tile coverage rect.
1824
1825         Test: platform/mac/tiled-drawing/use-tiled-drawing.html
1826
1827         * page/Frame.h:
1828         * platform/graphics/GraphicsLayer.cpp:
1829         (showGraphicsLayerTree):
1830         * platform/graphics/GraphicsLayer.h:
1831         (WebCore::GraphicsLayer::tiledBacking):
1832         * platform/graphics/TiledBacking.h:
1833         * platform/graphics/ca/GraphicsLayerCA.cpp:
1834         (WebCore::GraphicsLayerCA::tiledBacking):
1835         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
1836         * platform/graphics/ca/GraphicsLayerCA.h:
1837         (GraphicsLayerCA):
1838         * platform/graphics/ca/mac/TileCache.h:
1839         (WebCore::TileCache::tileCoverageRect):
1840         (TileCache):
1841         * platform/graphics/ca/mac/TileCache.mm:
1842         (WebCore::TileCache::computeTileCoverageRect):
1843         (WebCore::TileCache::revalidateTiles):
1844         * rendering/RenderLayerCompositor.cpp:
1845         (WebCore::RenderLayerCompositor::layerTreeAsText):
1846         * testing/Internals.cpp:
1847         (WebCore::Internals::layerTreeAsText):
1848         * testing/Internals.h:
1849         * testing/Internals.idl:
1850
1851 2012-10-23  No'am Rosenthal  <noam.rosenthal@nokia.com>
1852
1853         Coordinated Graphics: Enable threaded/IPC animations
1854         https://bugs.webkit.org/show_bug.cgi?id=93146
1855
1856         Reviewed by Kenneth Rohde Christiansen.
1857
1858         Add enablers to TextureMapper and GraphicsLayerAnimation so that they could be used
1859         across processes with IPC. Added some public accessors to GraphicsLayerAnimation,
1860         and allowed a GraphicsLayerTextureMapper to receive a full list of animations.
1861
1862         Covered by existing animation and compositing tests.
1863
1864         * platform/graphics/GraphicsLayerAnimation.cpp:
1865         (WebCore::GraphicsLayerAnimation::GraphicsLayerAnimation):
1866             Initialize the animation with the startTime instead of the offset.
1867
1868         (WebCore::GraphicsLayerAnimations::getActiveAnimations):
1869         * platform/graphics/GraphicsLayerAnimation.h:
1870         (WebCore::GraphicsLayerAnimation::setState):
1871             Allow setting the pause time as well.
1872
1873         (WebCore::GraphicsLayerAnimation::boxSize):
1874         (WebCore::GraphicsLayerAnimation::startTime):
1875         (WebCore::GraphicsLayerAnimation::pauseTime):
1876         (WebCore::GraphicsLayerAnimation::animation):
1877         (WebCore::GraphicsLayerAnimation::keyframes):
1878         (WebCore::GraphicsLayerAnimation::listsMatch):
1879         (WebCore::GraphicsLayerAnimations::size):
1880         (WebCore::GraphicsLayerAnimations::animations):
1881             Add public accessors to GraphicsLayerAnimation properties.
1882
1883         (GraphicsLayerAnimation):
1884         (GraphicsLayerAnimations):
1885         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1886         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1887         (WebCore::GraphicsLayerTextureMapper::setAnimations):
1888             Allow replacing the entire list of animations.
1889
1890         (WebCore):
1891         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1892         (GraphicsLayerTextureMapper):
1893         * platform/graphics/texmap/TextureMapperLayer.cpp:
1894         (WebCore::TextureMapperLayer::applyAnimationsRecursively):
1895         (WebCore):
1896         * platform/graphics/texmap/TextureMapperLayer.h:
1897         (TextureMapperLayer):
1898
1899 2012-10-23  Chris Rogers  <crogers@google.com>
1900
1901         Change setTargetValueAtTime() to setTargetAtTime()
1902         https://bugs.webkit.org/show_bug.cgi?id=100153
1903
1904         Reviewed by Adam Barth.
1905
1906         The AudioParam method name has changed due to Web Audio API spec review.
1907         Keep legacy support for the old name.
1908
1909         Test: webaudio/audioparam-setTargetAtTime.html
1910
1911         * Modules/webaudio/AudioParam.h:
1912         (WebCore::AudioParam::setTargetAtTime):
1913         * Modules/webaudio/AudioParam.idl:
1914         * Modules/webaudio/AudioParamTimeline.cpp:
1915         (WebCore::AudioParamTimeline::setTargetAtTime):
1916         (WebCore::AudioParamTimeline::valuesForTimeRangeImpl):
1917         * Modules/webaudio/AudioParamTimeline.h:
1918         (AudioParamTimeline):
1919
1920 2012-10-23  Benjamin Poulain  <benjamin@webkit.org>
1921
1922         [Mac] Remove extraneous conversion to String->NSString
1923         https://bugs.webkit.org/show_bug.cgi?id=100044
1924
1925         Reviewed by Darin Adler.
1926
1927         Improve some unfortunate use of String->NSString.
1928
1929         * accessibility/mac/AXObjectCacheMac.mm:
1930         (WebCore::AXObjectCache::postPlatformNotification): The variable macNotification is ultimately
1931         needed as NSString, and all its value are or can be NSString.
1932         Convert the last 3 char* values to NSString literal and use NSString* all the way.
1933
1934         * loader/mac/LoaderNSURLExtras.h:
1935         * loader/mac/LoaderNSURLExtras.mm:
1936         (suggestedFilenameWithMIMEType):
1937         We converted the String to NSString to pass to suggestedFilenameWithMIMEType. There is no need
1938         for the string to be a NSSTring there, we can leave it in its original type.
1939
1940         The case checking for a nil MIMEType was dead code because the implicit conversion never returns nil.
1941
1942         * platform/mac/DragImageMac.mm:
1943         (WebCore::createDragImageForLink):
1944         Use String's nsStringNilIfEmpty().
1945
1946         * platform/mac/HTMLConverter.mm:
1947         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1948         Fix the coding style. Do the conversion to NSString only when needed.
1949
1950 2012-10-23  Roger Fong  <roger_fong@apple.com>
1951
1952         [Win] Popup menus positioning needs to take multiple monitors into account.
1953         https://bugs.webkit.org/show_bug.cgi?id=100158
1954
1955         Reviewed by Timothy Horton.
1956
1957         Add screen.x() to repositioning check to account for position of current monitor.
1958
1959         * platform/win/PopupMenuWin.cpp:
1960         (WebCore::PopupMenuWin::calculatePositionAndSize):
1961
1962 2012-10-23  Huang Dongsung  <luxtella@company100.net>
1963
1964         [CSS Shaders] Set FilterOperations on GraphicsLayer after the program of CSS Shaders is loaded.
1965         https://bugs.webkit.org/show_bug.cgi?id=99908
1966
1967         Reviewed by Dean Jackson.
1968
1969         CSS Shaders can not render anything until the program is loaded. If there is
1970         partial loaded shaders program, whole FilterOperations chain can not render
1971         anything. It occurs a flash. So We have to wait until the program is loaded, to
1972         prevent a flash as RenderLayerBacking::updateImageContents() waits until an
1973         image is fully loaded.
1974
1975         No new tests, CSS Shaders on Accelerated Compositing are not activated yet.
1976
1977         * rendering/RenderLayerBacking.cpp:
1978         (WebCore::RenderLayerBacking::updateFilters):
1979
1980 2012-10-23  Elliott Sprehn  <esprehn@chromium.org>
1981
1982         Generated should not be supported for things with a shadow
1983         https://bugs.webkit.org/show_bug.cgi?id=98836
1984
1985         Reviewed by Dimitri Glazkov.
1986
1987         As far as CSS is concerned inputs and things with shadow content inside
1988         shouldn't support pseudo elements like :before, :after or :first-letter.
1989         Neither Gecko or Presto supports it, and we only accidentally supported
1990         it.
1991
1992         Until the spec tells us what to do we should disable support. This is
1993         also neccesary because the new generated content implementation doesn't
1994         support shadows.
1995
1996         Test: fast/forms/pseudo-elements.html
1997
1998         * rendering/RenderBlock.cpp:
1999         (WebCore::RenderBlock::updateFirstLetter):
2000         * rendering/RenderListBox.h: Added missing canHaveGeneratedChildren() that returns false.
2001         * rendering/RenderObjectChildList.cpp:
2002         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
2003
2004 2012-10-23  Huang Dongsung  <luxtella@company100.net>
2005
2006         [CSS Shaders] Implement overlay, color-dodge, color-burn, hard-light, soft-light blend modes.
2007         https://bugs.webkit.org/show_bug.cgi?id=98504
2008
2009         Reviewed by Dean Jackson.
2010
2011         Add expressions for the aforementioned blend modes. The expressions are lifted
2012         directly from the CSS Compositing and Blending spec [1]. WebKit adds these
2013         blending expressions to the author's shader.
2014
2015         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnormal
2016
2017         Test: css3/filters/custom/custom-filter-blend-modes.html
2018
2019         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2020         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
2021         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
2022
2023 2012-10-23  Huang Dongsung  <luxtella@company100.net>
2024
2025         [CSS Shaders] Implement all composite operators except destination and lighter.
2026         https://bugs.webkit.org/show_bug.cgi?id=97859
2027
2028         Reviewed by Dean Jackson.
2029
2030         Add expressions for all composite operators except destination and
2031         lighter. The expressions are lifted directly from the CSS Compositing
2032         and Blending spec [1]. WebKit adds these compositing expressions to the
2033         author's shader.
2034
2035         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#advancedcompositing
2036
2037         Test: css3/filters/custom/custom-filter-composite-operators.html
2038
2039         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
2040         (WebCore::CustomFilterCompiledProgram::initializeParameterLocations):
2041             Remove ASSERTION checking if glGetUniformLocation returns negative,
2042             because ASSERTION can fail with clear and copy composite operations.
2043             Clear and copy composite operations do not need "css_u_texture"
2044             representing the DOM element texture. If the driver compiler is
2045             smart, "css_u_texture" is not regarded as an active uniform, so
2046             glGetuniformLocation returns -1. glGetAttribLocation ditto.
2047         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2048         (WebCore::CustomFilterValidatedProgram::compiledProgram):
2049             Move the above ASSERTION in CustomFilterCompiledProgram to here.
2050             ASSERTION checks if m_samplerLocation is not -1 when the author
2051             shader needs an input texture.
2052         (WebCore::CustomFilterValidatedProgram::needsInputTexture):
2053         (WebCore):
2054         (WebCore::CustomFilterValidatedProgram::compositeFunctionString):
2055         * platform/graphics/filters/CustomFilterValidatedProgram.h:
2056         (CustomFilterValidatedProgram):
2057
2058 2012-10-23  Max Vujovic  <mvujovic@adobe.com>
2059
2060         [CSS Shaders] Changing the blend mode in CSS doesn't update the custom filter rendering
2061         https://bugs.webkit.org/show_bug.cgi?id=99887
2062
2063         Reviewed by Dirk Schulze.
2064
2065         Before this patch, WebKit would not recompute an element's style when just its custom filter
2066         blend mode changed.
2067
2068         For example, suppose an element initially has the style:
2069         -webkit-filter: custom(none mix(url(shader.fs) multiply source-atop));
2070
2071         Then, we change the blend mode from "multiply" to "normal":
2072         -webkit-filter: custom(none mix(url(shader.fs) normal source-atop));
2073
2074         WebKit now detects this change and recomputes the style.
2075
2076         CustomFilterProgram now has an equals operator that considers the program type and the mix
2077         settings. The mix settings contain the blend mode.
2078
2079         Test: css3/filters/custom/custom-filter-change-blend-mode.html
2080
2081         * platform/graphics/filters/CustomFilterProgram.cpp:
2082         (WebCore::CustomFilterProgram::operator==):
2083             Previously, the equals operator was pure virtual in CustomFilterProgram. Now,
2084             CustomFilterProgram implements it and compares the program type and mix settings, if
2085             appropriate.
2086         (WebCore):
2087         * platform/graphics/filters/CustomFilterProgram.h:
2088         * platform/graphics/filters/CustomFilterProgramInfo.cpp:
2089         (WebCore::CustomFilterProgramInfo::hash):
2090             Refactor a repeated condition into a boolean to improve readability.
2091         (WebCore::CustomFilterProgramInfo::operator==):
2092             Refactor repeated conditions to improve readability. Reorder the conditions so the less
2093             expensive ones occur first.
2094         * rendering/style/StyleCustomFilterProgram.h:
2095         (WebCore::StyleCustomFilterProgram::operator==):
2096             Call the base class's equals operator.
2097
2098 2012-10-23  David Barton  <dbarton@mathscribe.com>
2099
2100         [MathML] Symbol font uses greek letters for roman ones on linux and Windows
2101         https://bugs.webkit.org/show_bug.cgi?id=99921
2102
2103         Reviewed by Eric Seidel.
2104
2105         For parts of stretched parentheses and brackets, mathml.css currently uses the Symbol font,
2106         which on linux and Windows has greek letters at roman code points. To fix this, we switch
2107         to the STIXSizeOneSym font when available. However, this can cause vertical gaps between
2108         glyph parts, because of hard-coded constants in RenderMathMLOperator.cpp. We eliminate all
2109         these constants. We also shift glyphs upward by 1px and truncate them to avoid the gaps.
2110
2111         Tested by existing tests, and one test added to LayoutTests/mathml/presentation/mo.xhtml.
2112
2113         * css/mathml.css:
2114         (math, mfenced > *):
2115             - Set font-family for mn, mi, etc.
2116         (mo, mfenced):
2117             - Set font-family for mo and anonymous operators, including extension glyphs for
2118               stretched operators like parentheses and brackets.
2119         (math):
2120         * rendering/mathml/RenderMathMLOperator.cpp:
2121         (WebCore):
2122             - Change 0x23d0 to 0x23aa for STIX & Cambria Math fonts.
2123         (WebCore::RenderMathMLOperator::glyphHeightForCharacter):
2124         (WebCore::RenderMathMLOperator::updateFromElement):
2125         (WebCore::RenderMathMLOperator::createStackableStyle):
2126             - Eliminate unused lineHeight and topRelative parameters, and the hard-coded font size
2127               of 14.
2128         (WebCore::RenderMathMLOperator::createGlyph):
2129             - Eliminate unused lineHeight and topRelative parameters.
2130         * rendering/mathml/RenderMathMLOperator.h:
2131         (RenderMathMLOperator):
2132
2133 2012-10-23  Benjamin Poulain  <benjamin@webkit.org>
2134
2135         WTFURL: Implement KURL::setPort()
2136         https://bugs.webkit.org/show_bug.cgi?id=99898
2137
2138         Reviewed by Adam Barth.
2139
2140         * platform/KURLWTFURL.cpp:
2141         (WebCore::KURL::setPort):
2142
2143 2012-10-23  Nico Weber  <thakis@chromium.org>
2144
2145         In the open-source jpeg decoder, read image orientation from the exif data
2146         https://bugs.webkit.org/show_bug.cgi?id=100144
2147
2148         Reviewed by Eric Seidel.
2149
2150         This will be used to implement the shouldRespectImageOrientation
2151         setting (see bug 19688). Currently this isn't hooked up anywhere, so
2152         it has no observable effect for now.
2153
2154         Once it's hooked up, it will be tested by
2155         fast/images/exif-orientation.html
2156
2157         * platform/graphics/BitmapImage.h:
2158         * platform/image-decoders/ImageDecoder.h:
2159         (WebCore::ImageDecoder::orientation):
2160         (ImageDecoder):
2161         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2162         (WebCore::readUint16):
2163         (WebCore):
2164         (WebCore::readUint32):
2165         (WebCore::checkExifHeader):
2166         (WebCore::readImageOrientation):
2167         (WebCore::JPEGImageReader::JPEGImageReader):
2168         (WebCore::JPEGImageReader::decode):
2169         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
2170         (WebCore::JPEGImageDecoder::setOrientation):
2171
2172 2012-10-23  Chris Rogers  <crogers@google.com>
2173
2174         Fix thread safety issue in AudioParamTimeline
2175         https://bugs.webkit.org/show_bug.cgi?id=100154
2176
2177         Reviewed by Kenneth Russell.
2178
2179         Add appropriate locking in AudioParamTimeline::valueForContextTime()
2180
2181         * Modules/webaudio/AudioParamTimeline.cpp:
2182         (WebCore::AudioParamTimeline::valueForContextTime):
2183
2184 2012-10-23  Alec Flett  <alecflett@chromium.org>
2185
2186         IndexedDB: refactor backend to use IDB*Metadata
2187         https://bugs.webkit.org/show_bug.cgi?id=100055
2188
2189         Reviewed by Tony Chang.
2190
2191         This further encapsulates the static data in
2192         IDBObjectStoreBackendImpl and IDBIndexBackendImp into their
2193         respective IDB*Metadata structs, in preparation for
2194         https://bugs.webkit.org/show_bug.cgi?id=99774.
2195
2196         No new tests as this is purely a refactor.
2197
2198         * Modules/indexeddb/IDBBackingStore.h:
2199         (IDBBackingStore):
2200         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2201         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
2202         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
2203         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
2204         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
2205         (WebCore::IDBIndexBackendImpl::metadata):
2206         * Modules/indexeddb/IDBIndexBackendImpl.h:
2207         (WebCore::IDBIndexBackendImpl::create):
2208         (WebCore::IDBIndexBackendImpl::id):
2209         (WebCore::IDBIndexBackendImpl::setId):
2210         (WebCore::IDBIndexBackendImpl::hasValidId):
2211         (WebCore::IDBIndexBackendImpl::name):
2212         (WebCore::IDBIndexBackendImpl::keyPath):
2213         (WebCore::IDBIndexBackendImpl::unique):
2214         (WebCore::IDBIndexBackendImpl::multiEntry):
2215         (IDBIndexBackendImpl):
2216         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2217         (WebCore::IDBLevelDBBackingStore::getObjectStores):
2218         (WebCore::IDBLevelDBBackingStore::getIndexes):
2219         * Modules/indexeddb/IDBLevelDBBackingStore.h:
2220         (IDBLevelDBBackingStore):
2221         * Modules/indexeddb/IDBMetadata.h:
2222         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
2223         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2224         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
2225         (WebCore::IDBObjectStoreBackendImpl::metadata):
2226         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2227         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2228         (WebCore::IDBObjectStoreBackendImpl::createIndex):
2229         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
2230         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
2231         (WebCore::IDBObjectStoreBackendImpl::create):
2232         (WebCore::IDBObjectStoreBackendImpl::id):
2233         (WebCore::IDBObjectStoreBackendImpl::setId):
2234         (WebCore::IDBObjectStoreBackendImpl::name):
2235         (WebCore::IDBObjectStoreBackendImpl::keyPath):
2236         (WebCore::IDBObjectStoreBackendImpl::autoIncrement):
2237         (IDBObjectStoreBackendImpl):
2238
2239 2012-10-19  Roger Fong  <roger_fong@apple.com>
2240
2241         [WebGL] conformance/textures/texture-size.html is failing on Apple Mountain Lion
2242         https://bugs.webkit.org/show_bug.cgi?id=94041
2243
2244         Reviewed by Dean Jackson.
2245
2246         When binding a texture to GL_TEXTURE_2D when GL_ACTIVE_TEXTURE is 0, we set m_boundTexture0 to the texture unit. 
2247         However when we delete the texture, we need to be setting m_boundTexture0 to 0.
2248         Otherwise when we draw to the screen we bind m_boundTexture0 in the prepareTexture() method and since the associated texture 
2249         has already been deleted we end up in an error state.
2250
2251         Tested using Khronos WebGL conformance suite:
2252         conformance/textures/texture-size.html
2253
2254         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2255         (WebCore::GraphicsContext3D::deleteTexture):
2256
2257 2012-10-22  Dirk Schulze  <krit@webkit.org>
2258
2259         BasicShapePolygon::path takes width instead of height for boundary calculation
2260         https://bugs.webkit.org/show_bug.cgi?id=99919
2261
2262         Reviewed by Darin Adler.
2263
2264         The 'y' parameters of polygon were calculated by the with of the bounding box of the object.
2265         This caused problems on percentage values for point positions. 
2266         Changed it to the height of the bounding box.
2267
2268         Test: css3/masking/clip-path-polygon-percentage.html
2269
2270         * rendering/style/BasicShapes.cpp:
2271         (WebCore::BasicShapePolygon::path):
2272
2273 2012-10-23  Dominik Röttsches  <dominik.rottsches@intel.com>
2274
2275         Add timeout support to XMLHttpRequest
2276         https://bugs.webkit.org/show_bug.cgi?id=74802
2277
2278         Reviewed by Nate Chapin.
2279
2280         An implementation of XHR2 timeouts by using ResourceRequest's setTimeoutInterval.
2281         This made several changes necessary in CachedResource and SubresourceLoader in order
2282         to distinguish and forward the timeout case from there.
2283
2284         The case of late updates to the timeout property, changing the timeout value after send()
2285         is not supported yet and handled separately in bug 98156.
2286
2287         XHR2 timeout tests were initially written by Mozilla's Alex Vincent's. He granted
2288         permission to reuse them under PD/BSD license
2289         in https://bugzilla.mozilla.org/show_bug.cgi?id=525816#c86 - big thanks!
2290         I adapted them for W3C testharness.js and split them into groups with shorter test running time
2291         so that they can be used as WebKit layout tests.
2292
2293         Tests: http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-aborted.html
2294                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-abortedonmain.html
2295                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-overridesexpires.html
2296                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-simple.html
2297                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-synconmain.html
2298                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-twice.html
2299                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-aborted.html
2300                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-overridesexpires.html
2301                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-simple.html
2302                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-synconworker.html
2303                http/tests/xmlhttprequest/timeout/xmlhttprequest-timeout-worker-twice.html
2304
2305         * loader/DocumentThreadableLoader.cpp:
2306         (WebCore::DocumentThreadableLoader::notifyFinished): Forward information about timeout case.
2307         * loader/SubresourceLoader.cpp:
2308         (WebCore::SubresourceLoader::didFail): Distinguish timeout case when informing client.
2309         * loader/cache/CachedResource.h: Distinguishing timeout case for errors.
2310         (WebCore::CachedResource::errorOccurred):
2311         (WebCore::CachedResource::loadFailedOrCanceled):
2312         (WebCore::CachedResource::timedOut):
2313         * xml/XMLHttpRequest.cpp:
2314         (WebCore::XMLHttpRequest::XMLHttpRequest): Initializing m_timeout value to zero.
2315         (WebCore::XMLHttpRequest::setTimeout): Setter function, possibly raising JS exception.
2316         (WebCore):
2317         (WebCore::XMLHttpRequest::open): Open call may raise exception for synchronous requests when timeout value is set.
2318         (WebCore::XMLHttpRequest::createRequest): Assigning timeout value to ResourceRequest.
2319         (WebCore::XMLHttpRequest::didFail): Handling timeout case separately.
2320         (WebCore::XMLHttpRequest::didTimeout): Timeout case state transisition and event firing as spec'ed.
2321         * xml/XMLHttpRequest.h: New event listener, member and callback for handling timeout.
2322         (WebCore::XMLHttpRequest::timeout):
2323         (XMLHttpRequest):
2324         * xml/XMLHttpRequest.idl: New event listener and property added.
2325         * xml/XMLHttpRequestException.cpp:
2326         * xml/XMLHttpRequestException.h: Added an exception value for the timeout case.
2327
2328
2329 2012-10-23  Christophe Dumez  <christophe.dumez@intel.com>
2330
2331         Possible assertion hit in WebCore::HTMLSelectElement::updateListBoxSelection()
2332         https://bugs.webkit.org/show_bug.cgi?id=99967
2333
2334         Reviewed by Tony Chang.
2335
2336         Fix assertion hit in WebCore::HTMLSelectElement::updateListBoxSelection() when
2337         pressing the left mouse button outside a multiselect and then moving the cursor
2338         over the multiselect element while holding the button down.
2339
2340         The issue is that the HTMLSelectElement handler for the mouse move event does
2341         not check if there is a selection before trying to extend the selection.
2342
2343         Test: fast/dom/HTMLSelectElement/select-selectedIndex-noAnchorIndex-crash.html
2344
2345         * html/HTMLSelectElement.cpp:
2346         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2347
2348 2012-10-23  Adam Barth  <abarth@webkit.org>
2349
2350         [V8] ScriptWrappable should hold the wrapper handle directly (Dromaeo/dom-modify and dom-traverse get ~2.5% faster)
2351         https://bugs.webkit.org/show_bug.cgi?id=97974
2352
2353         Reviewed by Eric Seidel.
2354
2355         Previously, we stored a pointer to a handle to a wrapper in Node. That
2356         is an extra layer of indirection that slows down finding the wrapper
2357         for the node. A handle is just a pointer, so we might as we just store
2358         the handle in the Node directly. That speeds up dom-modify and
2359         dom-traverse by about 2.5%.
2360
2361         This change also lets us get rid of the ChunkedTable we were using to
2362         store all the wrappers because they're now stored in the Nodes
2363         directly.
2364
2365         * bindings/scripts/CodeGeneratorV8.pm:
2366         (GenerateHeader):
2367         * bindings/v8/IntrusiveDOMWrapperMap.h:
2368         (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
2369         (WebCore::IntrusiveDOMWrapperMap::get):
2370         (WebCore::IntrusiveDOMWrapperMap::set):
2371         (WebCore::IntrusiveDOMWrapperMap::contains):
2372         (WebCore::IntrusiveDOMWrapperMap::visit):
2373         (WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
2374         (WebCore::IntrusiveDOMWrapperMap::clear):
2375         * bindings/v8/ScriptWrappable.h:
2376         (WebCore::ScriptWrappable::ScriptWrappable):
2377         (WebCore::ScriptWrappable::wrapper):
2378         (WebCore::ScriptWrappable::setWrapper):
2379         (WebCore::ScriptWrappable::disposeWrapper):
2380         (WebCore::ScriptWrappable::reportMemoryUsage):
2381         (ScriptWrappable):
2382         * bindings/v8/V8DOMWrapper.h:
2383         (WebCore::V8DOMWrapper::getCachedWrapper):
2384
2385 2012-10-23  Kentaro Hara  <haraken@chromium.org>
2386
2387         [V8] Replace SetGlobalGCPrologueCallback() with AddGCPrologueCallback()
2388         https://bugs.webkit.org/show_bug.cgi?id=100140
2389
2390         Reviewed by Adam Barth.
2391
2392         SetGlobalGCPrologueCallback() and SetGlobalGCEpilogueCallback()
2393         are deprecated (See http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/include/v8.h&exact_package=chromium&q=v8.h&type=cs&l=3149)
2394         Instead we should use AddGCPrologueCallback()
2395         and AddGCEpilogueCallback().
2396
2397         No tests. No change in behavior.
2398
2399         * bindings/v8/V8DOMWindowShell.cpp:
2400         (WebCore::initializeV8IfNeeded):
2401         * bindings/v8/V8GCController.cpp:
2402         (WebCore::V8GCController::gcPrologue):
2403         (WebCore):
2404         (WebCore::V8GCController::minorGCPrologue):
2405         (WebCore::V8GCController::majorGCPrologue):
2406         (WebCore::V8GCController::gcEpilogue):
2407         (WebCore::V8GCController::minorGCEpilogue):
2408         (WebCore::V8GCController::majorGCEpilogue):
2409         * bindings/v8/V8GCController.h:
2410         (V8GCController):
2411         * bindings/v8/WorkerContextExecutionProxy.cpp:
2412         (WebCore::WorkerContextExecutionProxy::initIsolate):
2413
2414 2012-10-23  Adam Barth  <abarth@webkit.org>
2415
2416         [V8] Enumerate Nodes via the V8 heap rather than via a list in WebCore
2417         https://bugs.webkit.org/show_bug.cgi?id=100033
2418
2419         Reviewed by Eric Seidel.
2420
2421         This patch changes how we enumerate nodes during garbage collection.
2422         After this patch, we use V8's list of open handles to enumerate node
2423         wrappers rather than using a separate list that we maintain in WebCore
2424         for this purpose. A future patch will remove the list in WebCore for a
2425         DOM performance gain.
2426
2427         * bindings/js/ScriptProfiler.h:
2428         (WebCore):
2429         (WebCore::ScriptProfiler::visitNodeWrappers):
2430         * bindings/scripts/CodeGeneratorV8.pm:
2431         (GenerateToV8Converters):
2432         * bindings/scripts/test/V8/V8TestNode.cpp:
2433         (WebCore::V8TestNode::wrapSlow):
2434         * bindings/v8/IntrusiveDOMWrapperMap.h:
2435         (WebCore::IntrusiveDOMWrapperMap::set):
2436         * bindings/v8/ScriptProfiler.cpp:
2437         (WebCore::ScriptProfiler::visitNodeWrappers):
2438         * bindings/v8/ScriptProfiler.h:
2439         (WebCore):
2440         (ScriptProfiler):
2441         * bindings/v8/V8DOMMap.cpp:
2442         (WebCore::NodeWrapperVisitor::~NodeWrapperVisitor):
2443         (WebCore):
2444         (WebCore::visitAllDOMNodes):
2445         * bindings/v8/V8DOMMap.h:
2446         (WebCore):
2447         (NodeWrapperVisitor):
2448         * bindings/v8/V8DOMWrapper.cpp:
2449         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode):
2450         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMNode):
2451         * bindings/v8/V8GCController.cpp:
2452         (WebCore::NodeVisitor::visitNodeWrapper):
2453         (WebCore::V8GCController::gcPrologue):
2454         (WebCore::V8GCController::gcEpilogue):
2455         * inspector/BindingVisitors.h:
2456         (WebCore::WrappedNodeVisitor::~WrappedNodeVisitor):
2457         * inspector/InspectorMemoryAgent.cpp:
2458         (WebCore):
2459
2460 2012-10-22  Andrey Kosyakov  <caseq@chromium.org>
2461
2462         Web Inspector: paint rectangles are incorrectly shown in case subframes are present
2463         https://bugs.webkit.org/show_bug.cgi?id=99849
2464
2465         Reviewed by Pavel Feldman.
2466
2467         Move GraphicsContext and paint rectangle from willPaint() to didPaint(), so we don't have
2468         to store them as a state of InspectorPageAgent
2469
2470         * inspector/InspectorInstrumentation.cpp:
2471         (WebCore):
2472         (WebCore::InspectorInstrumentation::willPaintImpl):
2473         (WebCore::InspectorInstrumentation::didPaintImpl):
2474         * inspector/InspectorInstrumentation.h:
2475         (InspectorInstrumentation):
2476         (WebCore::InspectorInstrumentation::willPaint):
2477         (WebCore::InspectorInstrumentation::didPaint):
2478         * inspector/InspectorPageAgent.cpp:
2479         (WebCore::InspectorPageAgent::didPaint):
2480         * inspector/InspectorPageAgent.h:
2481         * inspector/InspectorTimelineAgent.cpp:
2482         (WebCore::InspectorTimelineAgent::willPaint):
2483         (WebCore::InspectorTimelineAgent::didPaint):
2484         * inspector/InspectorTimelineAgent.h:
2485         (InspectorTimelineAgent):
2486         * inspector/TimelineRecordFactory.cpp:
2487         * inspector/TimelineRecordFactory.h:
2488         (TimelineRecordFactory):
2489         * page/FrameView.cpp:
2490         (WebCore::FrameView::paintContents):
2491         * rendering/RenderLayerBacking.cpp:
2492         (WebCore::RenderLayerBacking::paintContents):
2493
2494 2012-10-23  Pavel Feldman  <pfeldman@chromium.org>
2495
2496         Web Inspector: array grouping does not work for arrays with exactly 10000 elements.
2497         https://bugs.webkit.org/show_bug.cgi?id=100131
2498
2499         Reviewed by Vsevolod Vlasov.
2500
2501         Using ceil() - 1 instead of floor() in bucket size calculation.
2502
2503         * inspector/front-end/ObjectPropertiesSection.js:
2504
2505 2012-10-23  Shinya Kawanaka  <shinyak@chromium.org>
2506
2507         The order of resolving distribution in tree composition is wrong.
2508         https://bugs.webkit.org/show_bug.cgi?id=99552
2509
2510         Reviewed by Dimitri Glazkov.
2511
2512         According to the current ShadowDOM spec, we have to resolve <content> first, then resolve <shadow>.
2513         However, the order of resolution is now the mixed tree order of <content> and <shadow>.
2514
2515         Test: fast/dom/shadow/content-reprojection-order.html
2516
2517         * html/shadow/ContentDistributor.cpp:
2518         (WebCore::ContentDistributor::distribute): We should resolve <content> before <shadow>.
2519         Only the first active shadow insertion point can select the rest of contents.
2520         * html/shadow/HTMLContentElement.h:
2521         (HTMLContentElement):
2522         * html/shadow/HTMLShadowElement.cpp:
2523         * html/shadow/HTMLShadowElement.h:
2524         (WebCore::isHTMLShadowElement):
2525         (WebCore):
2526         (WebCore::toHTMLShadowElement):
2527         * html/shadow/InsertionPoint.h:
2528         (InsertionPoint): We don't need doesSelectFromHostChildren() anymore.
2529
2530 2012-10-23  Vsevolod Vlasov  <vsevik@chromium.org>
2531
2532         Web Inspector: Move UISourceCode creation out of mappings to workspace.
2533         https://bugs.webkit.org/show_bug.cgi?id=100092
2534
2535         Reviewed by Pavel Feldman.
2536
2537         Moved uiSourceCode constructor calls out of mappings to workspace.
2538
2539         * inspector/front-end/CompilerScriptMapping.js:
2540         * inspector/front-end/NetworkUISourceCodeProvider.js:
2541         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
2542         (WebInspector.NetworkUISourceCodeProvider.prototype._addUISourceCode):
2543         * inspector/front-end/ResourceScriptMapping.js:
2544         (WebInspector.ResourceScriptMapping.prototype._deleteOriginalUISourceCodeForScripts):
2545         (WebInspector.ResourceScriptMapping.prototype._deleteTemporaryUISourceCodeForScripts):
2546         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
2547         (WebInspector.ResourceScriptMapping.prototype._createUISourceCode):
2548         (WebInspector.ResourceScriptMapping.prototype._getOrCreateTemporaryUISourceCode):
2549         (WebInspector.ResourceScriptMapping.prototype._getOrCreateOriginalUISourceCode):
2550         * inspector/front-end/SASSSourceMapping.js:
2551         (_bindUISourceCode):
2552         * inspector/front-end/ScriptSnippetModel.js:
2553         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2554         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
2555         * inspector/front-end/Workspace.js:
2556         (WebInspector.Project.prototype.addUISourceCode):
2557         (WebInspector.Project.prototype.removeUISourceCode):
2558         (WebInspector.Workspace.prototype.addTemporaryUISourceCode):
2559         (WebInspector.Workspace.prototype.removeTemporaryUISourceCode):
2560
2561 2012-10-23  Emil A Eklund  <eae@chromium.org>
2562
2563         Remove unnecessary m_layoutDelta[XY]Saturated initialization
2564         https://bugs.webkit.org/show_bug.cgi?id=100018
2565
2566         Reviewed by Julien Chaffraix.
2567         
2568         Remove unnecessary initialization from LayoutState constructor
2569         added in r132105.
2570
2571         No new tests, no change in functionality.
2572
2573         * rendering/LayoutState.cpp:
2574         (WebCore::LayoutState::LayoutState):
2575
2576 2012-10-23  Zeno Albisser  <zeno@webkit.org>
2577
2578         [Texmap] Fix drawTextureRectangleARB after r131485.
2579         https://bugs.webkit.org/show_bug.cgi?id=100133
2580
2581         Consistently rename u_textureSize to u_samplerSize.
2582
2583         Reviewed by Noam Rosenthal.
2584
2585         * platform/graphics/texmap/TextureMapperGL.cpp:
2586         (WebCore::TextureMapperGL::drawTextureRectangleARB):
2587         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2588         (WebCore::getShaderSpec):
2589         * platform/graphics/texmap/TextureMapperShaderManager.h:
2590         (TextureMapperShaderProgram):
2591
2592 2012-10-23  Mike West  <mkwst@chromium.org>
2593
2594         Web Inspector: 'data:' URLs should be properly trimmed for readability.
2595         https://bugs.webkit.org/show_bug.cgi?id=100083
2596
2597         Reviewed by Pavel Feldman.
2598
2599         We recently landed a patch to trim the middle out of long URLs in
2600         console messages in order to improve readability. That patch didn't
2601         effect 'data:' URLs, as they didn't match the regex in the linkifier.
2602         This patch ensures that 'data:' URLs are properly trimmed down to
2603         size.
2604
2605         This problem came to light while resolving a different, smaller issue:
2606         'image/jpg' wasn't whitelisted as an image MIME type. That trivial fix
2607         is included in this patch.
2608
2609         Test: http/tests/inspector/network/image-as-text-loading-data-url.html
2610
2611         * inspector/front-end/NetworkManager.js:
2612         (WebInspector.NetworkManager):
2613             Adds 'image/jpg' as a valid image type.
2614         * inspector/front-end/ResourceUtils.js:
2615         (WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
2616             Supports 'data:' URLs in the linkifier's regex.
2617
2618 2012-10-23  Mike West  <mkwst@chromium.org>
2619
2620         Web Inspector: Floated anchor element sometimes overlaps following content.
2621         https://bugs.webkit.org/show_bug.cgi?id=100105
2622
2623         Reviewed by Pavel Feldman.
2624
2625         This patch ensures that each console message clears the
2626         potentially-overlapping floated anchor element.
2627
2628         * inspector/front-end/inspector.css:
2629         (#console-prompt):
2630         (.console-message, .console-user-command):
2631             Clear the float, and flip the border from the bottom of the
2632             message to the top. Do the same for the prompt.
2633         (.console-message:first-child):
2634             Ensure that the first message doesn't have a top border.
2635
2636 2012-10-23  Alexander Pavlov  <apavlov@chromium.org>
2637
2638         Web Inspector: Crash when adding a keyframes rule in the Styles pane
2639         https://bugs.webkit.org/show_bug.cgi?id=99826
2640
2641         Reviewed by Pavel Feldman.
2642
2643         The client-supplied selector text is first parsed to make sure it results in a valid style rule selector.
2644
2645         Test: inspector/styles/add-new-rule-invalid-selector.html
2646
2647         * inspector/InspectorStyleSheet.cpp:
2648         (WebCore::createCSSParser):
2649         (WebCore):
2650         (WebCore::InspectorStyle::setPropertyText):
2651         (WebCore::checkStyleRuleSelector):
2652         (WebCore::InspectorStyleSheet::addRule):
2653         (WebCore::InspectorStyleSheet::ensureSourceData):
2654         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2655
2656 2012-10-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2657
2658         Add support for resolution media query
2659         https://bugs.webkit.org/show_bug.cgi?id=99077
2660
2661         Reviewed by Antti Koivisto.
2662
2663         Add support for 'resolution' media query feature.
2664
2665         Background info:
2666         http://www.w3.org/blog/CSS/2012/06/14/unprefix-webkit-device-pixel-ratio
2667
2668         Related spec links:
2669         http://www.w3.org/TR/css3-mediaqueries/#resolution (recommendation)
2670         http://www.w3.org/TR/css3-values/#resolution (candidate recommentation)
2671
2672         Add infrastructure to make it testable.
2673
2674         Test: fast/media/mq-resolution.html
2675
2676         * css/CSSParser.cpp:
2677         (WebCore::CSSParser::validUnit):
2678         (WebCore::CSSParser::createPrimitiveNumericValue):
2679         (WebCore::CSSParser::parseValidPrimitive):
2680         (WebCore::CSSParser::detectNumberToken):
2681         * css/CSSParser.h:
2682         * css/CSSPrimitiveValue.cpp:
2683         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2684         (WebCore::unitCategory):
2685         (WebCore::CSSPrimitiveValue::canonicalUnitTypeForCategory):
2686         (WebCore::CSSPrimitiveValue::customCssText):
2687         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2688         * css/CSSPrimitiveValue.h:
2689
2690             Enable dpi, dpcm and dppx units when RESOLUTION_MEDIA_QUERY
2691             is enabled.
2692
2693         * WebCore.exp.in:
2694
2695             Export the WebCore::Settings setting.
2696
2697         * css/CSSPrimitiveValue.h:
2698         (WebCore::CSSPrimitiveValue::isDotsPerInch):
2699         (WebCore::CSSPrimitiveValue::isDotsPerPixel):
2700         (WebCore::CSSPrimitiveValue::isDotsPerCentimeter):
2701         (CSSPrimitiveValue):
2702
2703             Add function for checking the recently added density types.
2704
2705         * css/MediaFeatureNames.h:
2706         (MediaFeatureNames):
2707
2708             Add support for resolution, min-resolution and max-resolution.
2709
2710         * css/MediaQueryEvaluator.cpp:
2711         (WebCore::compareResolution): Add methods for comparing resolutions.
2712         (WebCore):
2713         (WebCore::resolutionMediaFeatureEval):
2714         (WebCore::min_resolutionMediaFeatureEval):
2715         (WebCore::max_resolutionMediaFeatureEval):
2716
2717             Implement the resolution method evaluation.
2718
2719         * css/MediaQueryExp.cpp:
2720         (WebCore::featureWithValidPositiveDensity):
2721         (WebCore):
2722         (WebCore::featureWithoutValue):
2723         (WebCore::MediaQueryExp::MediaQueryExp):
2724
2725             Hook up resolution with the right pre-checks.
2726
2727        * page/Screen.cpp:
2728         (WebCore::Screen::horizontalDPI):
2729         (WebCore::Screen::verticalDPI):
2730
2731             Check whether an override exists, and if so, uses it.
2732             If not calculate the value given the device scale factor.
2733
2734         * page/Settings.cpp:
2735         (WebCore::Settings::setResolutionOverride):
2736         (WebCore):
2737         * page/Settings.h:
2738         (Settings):
2739         (WebCore::Settings::resolutionOverride):
2740
2741             Add a resolution override to settings.
2742
2743         * testing/InternalSettings.cpp:
2744         (WebCore::InternalSettings::Backup::Backup):
2745         (WebCore::InternalSettings::Backup::restoreTo):
2746         (WebCore::InternalSettings::setResolutionOverride):
2747         (WebCore):
2748         * testing/InternalSettings.h:
2749         (Backup):
2750         (InternalSettings):
2751         * testing/InternalSettings.idl:
2752
2753             Add a new setResolutionOverride method to internals.settings.
2754
2755 2012-10-23  Filip Spacek  <fspacek@rim.com>
2756
2757         [BlackBerry] Improve the use of stencil buffer during compositing
2758         https://bugs.webkit.org/show_bug.cgi?id=100020
2759
2760         We always want to scissor so remove the define.
2761         Only turn stenciling on if needed.
2762
2763         Reviewed by Rob Buis.
2764
2765         Reviewed internally by Arvid Nilsson.
2766
2767         * platform/graphics/blackberry/LayerRenderer.cpp:
2768         (WebCore::LayerRenderer::setViewport):
2769         (WebCore::LayerRenderer::compositeLayers):
2770         (WebCore::LayerRenderer::drawLayersOnSurfaces):
2771         (WebCore::LayerRenderer::compositeLayersRecursive):
2772         (WebCore::LayerRenderer::updateScissorIfNeeded):
2773
2774 2012-10-23  'Pavel Feldman'  <pfeldman@chromium.org>
2775
2776         Not reviewed: kick out non-chromium files from WebCore.gypi.
2777
2778         * WebCore.gypi:
2779
2780 2012-10-23  Alexander Shalamov  <alexander.shalamov@intel.com>
2781
2782         [EFL][WK2] ecore_x should be initialised in WebProcess to avoid re-initialization by PlatformScreenEfl utilities and systemBeep() function
2783         https://bugs.webkit.org/show_bug.cgi?id=100110
2784
2785         Reviewed by Kenneth Rohde Christiansen.
2786
2787         Removed initialization of ecore_x, since it is initialized when process starts.
2788
2789         test: fast/media/*
2790
2791         * platform/efl/PlatformScreenEfl.cpp:
2792         (WebCore::screenDepth):
2793         (WebCore::screenRect):
2794         * platform/efl/SoundEfl.cpp:
2795         (WebCore::systemBeep):
2796
2797 2012-10-23  Adam Klein  <adamk@chromium.org>
2798
2799         Always parse pasted fragments as HTML even on XHTML pages
2800         https://bugs.webkit.org/show_bug.cgi?id=99880
2801
2802         Reviewed by Ojan Vafai.
2803
2804         When pasting HTML into a page, using the XML parser is unlikely
2805         to work correctly, as the contents of the clipboard are unlikely
2806         to be properly-formed XHTML. Thus, for the pasting case, it's always
2807         better to use HTML parsing, which will properly parse either HTML
2808         (which is what's usually in the clipboard) or XHTML (which is
2809         sometimes there as well).
2810
2811         The Mac port previously worked around this problem by falling back to plain text
2812         when parsing failed, but switching to HTML seems like a clear improvement.
2813
2814         This also fixes a crash in Chromium (see http://webkit.org/b/99607
2815         and http://crbug.com/136218); it erroneously assumed that createFragmentFromMarkup()
2816         would never return null. This patch makes that true.
2817
2818         * editing/markup.cpp:
2819         (WebCore::createFragmentFromMarkup): Don't delegate to createContextualFragment:
2820         we already know our context element is safe (i.e., it's <body>),
2821         and we want to force HTML (not XML) parsing.
2822
2823 2012-10-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2824
2825         [Qt] REGRESSION (r130851): fast/text/word-space-with-kerning.html fails
2826         https://bugs.webkit.org/show_bug.cgi?id=98876
2827
2828         Reviewed by Simon Hausmann.
2829
2830         Do not add word-spacing for leading space. This matches what simple path font-width does.
2831
2832         Tested by existing tests.
2833
2834         * platform/graphics/qt/FontQt.cpp:
2835         (WebCore::Font::floatWidthForComplexText):
2836
2837 2012-10-23  Alexander Pavlov  <apavlov@chromium.org>
2838
2839         Web Inspector: Incorrect resolution of relative URLs containing a scheme in query parameters
2840         https://bugs.webkit.org/show_bug.cgi?id=100084
2841
2842         Reviewed by Vsevolod Vlasov.
2843
2844         Use the RFC 3986 grammar for the URL scheme.
2845
2846         * inspector/front-end/ParsedURL.js:
2847         (WebInspector.ParsedURL):
2848
2849 2012-10-23  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2850
2851         Web Inspector: Elaborate source panel sidebar context menus.
2852         https://bugs.webkit.org/show_bug.cgi?id=99980
2853
2854         Reviewed by Vsevolod Vlasov.
2855
2856         - Watches: add "Add watch expression" item to items and empty element
2857         - Watches: hide "Remove watch expression" from editing prompt context menu
2858         - Watches: add titles to header buttons
2859         - XHR Breakpoints: add "Add Breakpoint" item to items and empty element
2860         - XHR Breakpoints: add "Remove all breakpoints" item to items (when >1)
2861         - XHR Breakpoints: add title to header button
2862         - JS Breakpoints: hide "Remove/(De)Activate breakpoints" when only 1 item present
2863         - JS Breakpoints: add "(De)Activate breakpoints" to empty element context menu
2864
2865         * English.lproj/localizedStrings.js: Added corresponding strings.
2866         * inspector/front-end/BreakpointsSidebarPane.js: Adjusted context menu.
2867         (WebInspector.XHRBreakpointsSidebarPane): Ditto.
2868         * inspector/front-end/ObjectPropertiesSection.js: Added "isEditing()"
2869         * inspector/front-end/WatchExpressionsSidebarPane.js: Adjusted context menu.
2870
2871 2012-10-23  Kent Tamura  <tkent@chromium.org>
2872
2873         Update binding test results for r132194
2874         https://bugs.webkit.org/show_bug.cgi?id=100097
2875
2876         * bindings/scripts/test/V8/V8TestObj.cpp:
2877         (WebCore::V8TestObj::installPerContextProperties):
2878
2879 2012-10-23  Alexander Pavlov  <apavlov@chromium.org>
2880
2881         Web Inspector: Sass can only resolve same folder paths
2882         https://bugs.webkit.org/show_bug.cgi?id=99259
2883
2884         Reviewed by Vsevolod Vlasov.
2885
2886         The actual reason is that the rule source location linkifier tries to linkify a resource (*.scss), which does not exist,
2887         and falls back to just stripping the main page URL prefix from the rule location URL. This change introduces LiveLocations
2888         for CSSRule locations and makes sure they are linkified using uiSourceCode's parsedURL.displayName.
2889
2890         * inspector/front-end/CSSStyleModel.js:
2891         (WebInspector.CSSStyleModel): Introduced LiveLocation management for CSSRules.
2892         (WebInspector.CSSStyleModel.prototype.setSourceMapping):
2893         (WebInspector.CSSStyleModel.prototype._updateLocations):
2894         (WebInspector.CSSStyleModel.prototype.createLiveLocation):
2895         (WebInspector.CSSStyleModel.prototype.updateLocations):
2896         (WebInspector.CSSStyleModel.LiveLocation): A LiveLocation for the CSS domain.
2897         (WebInspector.CSSStyleModel.LiveLocation.prototype.uiLocation):
2898         (WebInspector.CSSStyleModel.LiveLocation.prototype.dispose):
2899         * inspector/front-end/Linkifier.js:
2900         (WebInspector.Linkifier.prototype.linkifyCSSRuleLocation): CSSRule LiveLocation-based link builder.
2901         (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor): Add a title for anchors.
2902         (WebInspector.Linkifier.DefaultCSSFormatter): Formatter for CSS location links.
2903         (WebInspector.Linkifier.DefaultCSSFormatter.prototype.formatLiveAnchor):
2904         * inspector/front-end/ResourceUtils.js:
2905         (WebInspector.displayNameForURL): Use parsedURL.displayName if uiSourceCode is present for the specified URL.
2906         * inspector/front-end/SASSSourceMapping.js:
2907         * inspector/front-end/StylesSidebarPane.js:
2908         (WebInspector.StylesSidebarPane):
2909         (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate):
2910         * inspector/front-end/inspector.html:
2911
2912 2012-10-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2913
2914         Unreviewed, rolling out r132149.
2915         http://trac.webkit.org/changeset/132149
2916         https://bugs.webkit.org/show_bug.cgi?id=100098
2917
2918         Breaks inspector profiler tests in debug mode. (Requested by
2919         pfeldman1 on #webkit).
2920
2921         * rendering/AutoTableLayout.cpp:
2922         (WebCore::AutoTableLayout::recalcColumn):
2923         * rendering/FixedTableLayout.cpp:
2924         (WebCore::FixedTableLayout::calcWidthArray):
2925         * rendering/RenderTable.cpp:
2926         (WebCore::RenderTable::layout):
2927         * rendering/RenderTableCol.cpp:
2928         (WebCore::RenderTableCol::styleDidChange):
2929         (WebCore::RenderTableCol::updateFromElement):
2930         (WebCore::RenderTableCol::computePreferredLogicalWidths):
2931         * rendering/RenderTableCol.h:
2932         (RenderTableCol):
2933
2934 2012-10-23  Simon Hausmann  <simon.hausmann@digia.com>
2935
2936         Unreviewed trivial Qt build fix: Fix build without USE_3D_GRAPHICS
2937
2938         Move the #if USE(GRAPHICS_SURFACE) up to protect the inclusion of
2939         GraphicsContext3D.h to be done only if we use the surface.
2940
2941         * platform/graphics/surfaces/GraphicsSurface.h:
2942
2943 2012-10-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2944
2945         Unreviewed, rolling out r132033.
2946         http://trac.webkit.org/changeset/132033
2947         https://bugs.webkit.org/show_bug.cgi?id=100097
2948
2949         Broke calendar picker (Requested by tkent on #webkit).
2950
2951         * bindings/scripts/CodeGeneratorV8.pm:
2952         (GenerateImplementation):
2953
2954 2012-10-23  Andras Becsi  <andras.becsi@digia.com>
2955
2956         Remove devicePixelRatio from ViewportAttributes
2957         https://bugs.webkit.org/show_bug.cgi?id=99845
2958
2959         Reviewed by Adam Barth.
2960
2961         Since r121555 the devicePixelRatio is not calculated any more
2962         and the scale factor is stored in Page::m_deviceScaleFactor,
2963         thus it can be removed from ViewportAttributes to reduce
2964         redundancy and unnecessary client code.
2965         Use a new parameter in viewport calculation functions using
2966         the visible viewport size (instead of passing the adjusted
2967         viewport size) so that after this change clients do not end
2968         up using the unadjusted viewport size for calculations.
2969
2970         No behavioural change, no new tests needed.
2971
2972         * WebCore.exp.in:
2973         * dom/ViewportArguments.cpp:
2974         (WebCore::computeViewportAttributes):
2975         (WebCore::computeMinimumScaleFactorForContentContained):
2976         Add the devicePixelRatio as a parameter.
2977         (WebCore::restrictMinimumScaleFactorToViewportSize): Ditto.
2978         * dom/ViewportArguments.h:
2979         (ViewportAttributes):
2980         (WebCore):
2981         * testing/InternalSettings.cpp:
2982         (WebCore::InternalSettings::configurationForViewport):
2983
2984 2012-10-23  Kent Tamura  <tkent@chromium.org>
2985
2986         Support full month names in DateTimeEditElement, and use them in input[type=month] by default
2987         https://bugs.webkit.org/show_bug.cgi?id=100060
2988
2989         Reviewed by Kentaro Hara.
2990
2991         According to https://plus.google.com/104770450049736549185/posts/4zsoeHoa7SM
2992         no one wants to show abbreviated month names for input[type=month].
2993         This change add support for full month names in DateTimeEditELement, and
2994         LocaleICU and LocaleMac retun month formats with full month names. Note
2995         that LocaleWin::monthFormat returns formats for full month names.
2996
2997         No new tests. Covered by fast/forms/month-multiple-fields/month-multiple-fields-appearance-*.html
2998
2999         * html/shadow/DateTimeEditElement.cpp:
3000         (WebCore::DateTimeEditBuilder::visitField):
3001         If count is 4, use Localizer::monthLabels or standAloneMonthLabels.
3002         * platform/text/LocaleICU.cpp:
3003         (WebCore::LocaleICU::monthFormat):
3004         Returns a format for full month names.
3005         * platform/text/mac/LocaleMac.mm:
3006         (WebCore::LocaleMac::monthFormat): Ditto.
3007
3008 2012-10-23  Mike West  <mkwst@chromium.org>
3009
3010         Viewport errors should be slightly friendlier with regard to ';'.
3011         https://bugs.webkit.org/show_bug.cgi?id=100003
3012
3013         Reviewed by Adam Barth.
3014
3015         This patch scans viewport values that cause errors for ';'. If found,
3016         a quick message is appended to the error, noting that semicolons are
3017         not valid separators in viewport contents, and that commas would be
3018         the proper substitute.
3019
3020         No functional changes, just a better error message.
3021
3022         * dom/ViewportArguments.cpp:
3023         (WebCore::reportViewportWarning):
3024
3025 2012-10-23  Timothy Hatcher  <timothy@apple.com>
3026
3027         Docking/undocking the Web Inspector does not work correctly in Safari.
3028
3029         The "docked" and "bottom" strings need quoted instead of being passed as identifiers.
3030
3031         https://bugs.webkit.org/show_bug.cgi?id=100080
3032
3033         Reviewed by Yury Semikhatsky.
3034
3035         * inspector/InspectorFrontendClientLocal.cpp:
3036         (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Put quotes around the %s.
3037
3038 2012-10-23  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3039
3040         [EFL][WK2] Compilation warning in GraphicsContext3DPrivate.cpp when AC is enabled
3041         https://bugs.webkit.org/show_bug.cgi?id=99723
3042
3043         Reviewed by Kenneth Rohde Christiansen.
3044
3045         Fix compilation warning in GraphicsContext3DPrivate.cpp when AC is
3046         enabled.
3047
3048         No new tests, no change in behavior.
3049
3050         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
3051         (WebCore::GraphicsContext3DPrivate::createSurface):
3052
3053 2012-10-23  Dan Carney  <dcarney@google.com>
3054
3055         When blocking localStorage, Firefox throws a security exception on access, and maybe so should we
3056         https://bugs.webkit.org/show_bug.cgi?id=63257
3057
3058         Reviewed by Jochen Eisinger.
3059
3060         Throw security exception when local storage is accessed
3061         under certain circumstances to match firefox.
3062
3063         No new tests. Existing tests modified.
3064
3065         * bindings/js/JSStorageCustom.cpp:
3066         (WebCore::JSStorage::canGetItemsForName):
3067         (WebCore::JSStorage::nameGetter):
3068         (WebCore::JSStorage::deleteProperty):
3069         (WebCore::JSStorage::getOwnPropertyNames):
3070         * bindings/v8/custom/V8StorageCustom.cpp:
3071         (WebCore):
3072         (WebCore::setDOMException):
3073         (WebCore::V8Storage::namedPropertyEnumerator):
3074         (WebCore::storageGetter):
3075         (WebCore::V8Storage::namedPropertyQuery):
3076         (WebCore::storageDeleter):
3077         * inspector/InspectorDOMStorageAgent.cpp:
3078         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
3079         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
3080         * page/DOMWindow.cpp:
3081         (WebCore::DOMWindow::sessionStorage):
3082         (WebCore::DOMWindow::localStorage):
3083         * storage/Storage.cpp:
3084         * storage/Storage.h:
3085         (WebCore):
3086         (WebCore::Storage::length):
3087         (WebCore::Storage::key):
3088         (WebCore::Storage::getItem):
3089         (WebCore::Storage::setItem):
3090         (WebCore::Storage::removeItem):
3091         (WebCore::Storage::clear):
3092         (WebCore::Storage::contains):
3093         * storage/Storage.idl:
3094         * storage/StorageArea.h:
3095         (StorageArea):
3096         * storage/StorageAreaImpl.cpp:
3097         (WebCore::StorageAreaImpl::canAccessStorage): Checks whether access to storage is a security violation.
3098         (WebCore):
3099         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):
3100         (WebCore::StorageAreaImpl::length):
3101         (WebCore::StorageAreaImpl::key):
3102         (WebCore::StorageAreaImpl::getItem):
3103         (WebCore::StorageAreaImpl::setItem):
3104         (WebCore::StorageAreaImpl::removeItem):
3105         (WebCore::StorageAreaImpl::clear):
3106         (WebCore::StorageAreaImpl::contains):
3107         * storage/StorageAreaImpl.h:
3108         (StorageAreaImpl):
3109
3110 2012-10-22  Joshua Bell  <jsbell@chromium.org>
3111
3112         IndexedDB: Remove custom binding code for IDBCursor.value
3113         https://bugs.webkit.org/show_bug.cgi?id=100034
3114
3115         Reviewed by Kentaro Hara.
3116
3117         Now that we're using ScriptValue instead of SerializedScriptValue we can just expose
3118         IDBCursor.value as an |any| (IDL) or |ScriptValue| (C++) to maintain the specified
3119         semantics that the object identity is retained across accesses.
3120
3121         Test: storage/indexeddb/cursor-value.html
3122
3123         * Modules/indexeddb/IDBCursor.cpp: Remove "dirty" tracking.
3124         (WebCore::IDBCursor::IDBCursor):
3125         (WebCore::IDBCursor::value):
3126         (WebCore::IDBCursor::setValueReady):
3127         * Modules/indexeddb/IDBCursor.h: IDBAny -> ScriptValue
3128         (IDBCursor):
3129         * Modules/indexeddb/IDBCursorWithValue.idl: IDBAny -> any
3130         * Modules/indexeddb/IDBObjectStore.cpp: No need to route through IDBAny to get ScriptValue.
3131         (WebCore):
3132         * UseV8.cmake: Remove references to IDBCustomBindings.cpp
3133         * WebCore.gypi: Ditto.
3134         * WebCore.vcproj/WebCore.vcproj: Ditto.
3135         * bindings/v8/IDBCustomBindings.cpp: Removed.
3136
3137 2012-10-22  Dan Bernstein  <mitz@apple.com>
3138
3139         Font’s fast code path is used for partial runs with kerning and ligatures, but shouldn’t be
3140         https://bugs.webkit.org/show_bug.cgi?id=100068
3141
3142         Reviewed by Sam Weinig.
3143
3144         As described in <http://webkit.org/b/100050>, the fast code path doesn’t handle partial runs
3145         correctly when kerning or ligatures are enabled. Since the partial-run case is uncommon,
3146         for now just use the complex code path in this case.
3147
3148         * platform/graphics/Font.cpp:
3149         (WebCore::Font::drawText): Changed to use the complex path for partial runs if there are any
3150         typesetting features.
3151         (WebCore::Font::drawEmphasisMarks): Ditto.
3152         (WebCore::Font::selectionRectForText): Ditto.
3153         (WebCore::Font::offsetForPosition): Changed to use the complex path if there are any
3154         typesetting features.
3155
3156 2012-10-22  Peter Wang  <peter.wang@torchmobile.com.cn>
3157
3158         [BlackBerry] Missing some cookies in HTTP response header when set several cookies in one "Set-Cookie" header.
3159         https://bugs.webkit.org/show_bug.cgi?id=99950
3160
3161         Reviewed by George Staikos.
3162
3163         In "NetworkJob::handleNotifyHeaderReceived", if there are several "Set-Cookie" headers, 
3164         we should combine the following ones with the first.
3165
3166         No new test case.
3167
3168         * platform/network/blackberry/NetworkJob.cpp:
3169         (WebCore::NetworkJob::handleNotifyHeaderReceived):
3170
3171 2012-10-22  MORITA Hajime  <morrita@google.com>
3172
3173         Assertion failed at WebCore::toInsertionPoint / WebCore::ContentDistributor::distribute
3174         https://bugs.webkit.org/show_bug.cgi?id=100038
3175
3176         Reviewed by Kent Tamura.
3177
3178         isHTMLContentElement() assumes that the content element always has
3179         a tag name "content" but it doesn't when Shadow DOM feature is
3180         disabled. This fix let the function see the correct tag name.
3181
3182         Test: fast/dom/shadow/insertion-points-with-shadow-disabled.html
3183
3184         * html/shadow/HTMLContentElement.cpp:
3185         (WebCore::HTMLContentElement::contentTagName):
3186         * html/shadow/HTMLContentElement.h:
3187         (HTMLContentElement):
3188         (WebCore::isHTMLContentElement):
3189
3190 2012-10-22  Shinya Kawanaka  <shinyak@chromium.org>
3191
3192         [Shadow] Fallback content should also be reprojection.
3193         https://bugs.webkit.org/show_bug.cgi?id=99750
3194
3195         Reviewed by Dimitri Glazkov.
3196
3197         Fallback content of InsertionPoint should be reprojected. The existing assumption that
3198         only the direct child of host element can be distributed to InsertionPoint does not hold anymore.
3199         So, if the parent of an element is InsertionPoint which should show fallback element, we have to
3200         check the grand parent of the element instead of the element.
3201
3202         Tests: fast/dom/shadow/content-reprojection-fallback-reprojection.html
3203                fast/dom/shadow/content-reprojection-fallback.html
3204
3205         * css/StyleResolver.cpp:
3206         (WebCore::shouldResetStyleInheritance): Checks the grandparent of the element if the parent is
3207         an InsertionPoint which uses fallback content.
3208         * dom/ComposedShadowTreeWalker.cpp:
3209         (WebCore::shadowOfParentForDistribution):
3210         (WebCore):
3211         (WebCore::resolveReprojection):
3212         (WebCore::ComposedShadowTreeWalker::traverseParent):
3213         * html/shadow/InsertionPoint.cpp:
3214         (WebCore::InsertionPoint::shouldUseFallbackElements): True if the InsertionPoint should use fallback content.
3215         (WebCore):
3216         * html/shadow/InsertionPoint.h:
3217         (WebCore::parentElementForDistribution): Returns the grandparent element if the parent is InsertionPoint which uses
3218         fallback content. Returns parent element otherwise.
3219         (WebCore):
3220
3221 2012-10-22  Keishi Hattori  <keishi@webkit.org>
3222
3223         Label position is wrong in the suggestion picker when all the suggestions have labels
3224         https://bugs.webkit.org/show_bug.cgi?id=99965
3225
3226         Reviewed by Kent Tamura.
3227
3228         Somehow the scrollbar was appearing and so the label element was being wrapped to the next line.
3229
3230         No new tests. Can't reproduce in layout test.
3231
3232         * Resources/pagepopups/suggestionPicker.css:
3233         (.suggestion-list):
3234         * Resources/pagepopups/suggestionPicker.js:
3235         (SuggestionPicker.prototype._fixWindowSize): Explicitly show the scroll bar.
3236
3237 2012-10-22  MORITA Hajime  <morrita@google.com>
3238
3239         [Chromium] Needs to track ShadowRoot usage
3240         https://bugs.webkit.org/show_bug.cgi?id=99955
3241
3242         Reviewed by Dimitri Glazkov.
3243
3244         Added an UMA instrumentation.
3245
3246         * dom/ShadowRoot.cpp:
3247         (WebCore::determineUsageType):
3248         (WebCore):
3249         (WebCore::ShadowRoot::create):
3250
3251 2012-10-22  Kent Tamura  <tkent@chromium.org>
3252
3253         Introduce Localizer::standAloneMonthLabels
3254         https://bugs.webkit.org/show_bug.cgi?id=99963
3255
3256         Reviewed by Kentaro Hara.
3257
3258         We realized full month names and full stand-alone month names were
3259         necessary for input[type=month] UI. We change the compile-flag for
3260         Localizer::monthLabels from "ENABLE(CALENDAR_PICKER)" to
3261         "ENABLE(CALENDAR_PICKER) || ENABLE(INPUT_MULTIPLE_FIELDS_UI)," and
3262         introduce Localizer::standAloneMonthLabels.
3263
3264         Tests: Add some test cases to Source/WebKit/chromium/LocaleMacTest.cpp
3265         and LocalizedDateICUTest.cpp.
3266
3267         * platform/text/Localizer.h:
3268         (Localizer):
3269         - Add pure virtual standAloneMonthLabels.
3270         - Change the condition for monthLabels.
3271
3272         * platform/text/LocaleNone.cpp:
3273         (LocaleNone): Declare monthLabels, standAloneMonthLabels, and m_monthLabels.
3274         (WebCore::LocaleNone::monthLabels):
3275         Added. It always returns English month names.
3276         (WebCore::LocaleNone::standAloneMonthLabels):
3277         Added. Just calls monthLabels.
3278
3279         * platform/text/LocaleWin.h:
3280         (LocaleWin):
3281         Declare standAloneMonthLabels, and change the condition for monthLabels.
3282         * platform/text/LocaleWin.cpp:
3283         (WebCore): Change the condition for monthLabels.
3284         (WebCore::LocaleWin::standAloneMonthLabels):
3285         Added. Just calls monthLabels.
3286
3287         * platform/text/mac/LocaleMac.h:
3288         (LocaleMac):
3289         - Add standAloneMonthLabels and m_standAloneMonthLabels
3290         - Change the condition for monthLabels and m_monthLabels.
3291         * platform/text/mac/LocaleMac.mm:
3292         (WebCore): Change the condition for monthLabels.
3293         (WebCore::LocaleMac::standAloneMonthLabels):
3294         Added. Get the information with NSDateFormatter::standaloneMonthSymbols.
3295
3296         * platform/text/LocaleICU.h:
3297         (LocaleICU):
3298         - Add standAloneMonthLabels and m_standAloneMonthLabels
3299         - Change the condition for monthLabels and m_monthLabels.
3300         * platform/text/LocaleICU.cpp:
3301         (WebCore::LocaleICU::initializeCalendar):
3302         Remove m_monthLabels initialization in order to avoid dependecy from monthLabels.
3303         (WebCore):
3304         (WebCore::createFallbackMonthLabels): Change the compile condition.
3305         (WebCore::LocaleICU::monthLabels):
3306         - Change the compile condition.
3307         - Don't depend on initializeCalendar to make the code for
3308         ENABLE(INPUT_MULTIPLE_FIELDS_UI) && !ENABLE(CALENDAR_PICKER) minimal.
3309         (WebCore::LocaleICU::standAloneMonthLabels):
3310         Added. The code is similar to shortStandAloneMonthLabels.
3311
3312 2012-10-22  Shinya Kawanaka  <shinyak@chromium.org>
3313
3314         Refactoring around ContainerNode::attachChildren
3315         https://bugs.webkit.org/show_bug.cgi?id=99968
3316
3317         Reviewed by Hajime Morita.
3318
3319         Since ContainerNode::attach() is now equivalent to ContainerNode::attachChildren() + Node::attach(), we should call
3320         ContainerNode::attach() instead of calling them.
3321
3322         No new tests, no change in behavior.
3323
3324         * dom/ContainerNode.h:
3325         (ContainerNode):
3326         * dom/Element.cpp:
3327         (WebCore::Element::attach):
3328         * dom/ShadowRoot.cpp:
3329         (WebCore::ShadowRoot::attach):
3330
3331 2012-10-22  Michael Saboff  <msaboff@apple.com>
3332
3333         HTML Parser should produce 8 bit strings for doctype, comment and tagName tokens
3334         https://bugs.webkit.org/show_bug.cgi?id=99889
3335
3336         Reviewed by Geoffrey Garen.
3337
3338         Added 8 bit check for accumulating all token data in MarkupTokenBase.  Added code to convert
3339         "name" token data directly to a string (8 or 16 as appropriate).  Changed to accumulate
3340         m_bufferedEndTagName as LChar's.
3341
3342         No new tests, covered by existing tests.
3343
3344         * html/parser/HTMLToken.h:
3345         (HTMLToken):
3346         * html/parser/HTMLTokenizer.cpp:
3347         (WebCore::HTMLTokenizer::nextToken):
3348         (WebCore::HTMLTokenizer::addToPossibleEndTag):
3349         (WebCore::HTMLTokenizer::isAppropriateEndTag):
3350         * html/parser/HTMLTokenizer.h:
3351         (HTMLTokenizer):
3352         * html/parser/HTMLTreeBuilder.cpp:
3353         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeLeading):
3354         * xml/parser/MarkupTokenBase.h:
3355         (WebCore::MarkupTokenBase::beginStartTag):
3356         (WebCore::MarkupTokenBase::beginEndTag):
3357         (MarkupTokenBase):
3358         (WebCore::MarkupTokenBase::beginDOCTYPE):
3359         (WebCore::MarkupTokenBase::appendToComment):
3360         (WebCore::MarkupTokenBase::appendToName):
3361         (WebCore::MarkupTokenBase::nameString):
3362         (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
3363
3364 2012-10-22  Tony Chang  <tony@chromium.org>
3365
3366         margin-top/bottom has no effect for child nodes of flex items
3367         https://bugs.webkit.org/show_bug.cgi?id=99923
3368
3369         Reviewed by Ojan Vafai.
3370
3371         Flexitems, like table cells, shouldn't collapse margins.
3372
3373         Test: css3/flexbox/flexitem-no-margin-collapsing.html
3374
3375         * rendering/RenderBlock.cpp:
3376         (WebCore::RenderBlock::MarginInfo::MarginInfo): Check to see if the parent is a flexible box.
3377         We should always have a parent if we make it this far in the check.
3378
3379 2012-10-22  Marja Hölttä  <marja@chromium.org>
3380
3381         Refactor CachedResourceLoader: add CachedResourceRequest
3382         https://bugs.webkit.org/show_bug.cgi?id=99736
3383
3384         Reviewed by Adam Barth.
3385
3386         For fixing bugs 84883 and 92761,
3387         CachedResourceLoader::requestResource should take as parameter
3388         information about who initiated the request. But the parameter
3389         list was already long. This gathers all the parameters into a
3390         separate class, CachedResourceRequest. The next step is to add
3391         information about who initiated the request into
3392         CachedResourceRequest.
3393
3394         No new tests because no changes in functionality, just moving code
3395         around.
3396
3397         * CMakeLists.txt:
3398         * GNUmakefile.list.am:
3399         * Target.pri:
3400         * WebCore.gypi:
3401         * WebCore.vcproj/WebCore.vcproj:
3402         * WebCore.xcodeproj/project.pbxproj:
3403         * css/CSSFontFaceSrcValue.cpp:
3404         (WebCore::CSSFontFaceSrcValue::cachedFont):
3405         * css/CSSImageSetValue.cpp:
3406         (WebCore::CSSImageSetValue::cachedImageSet):
3407         * css/CSSImageValue.cpp:
3408         (WebCore::CSSImageValue::cachedImage):
3409         * css/StyleRuleImport.cpp:
3410         (WebCore::StyleRuleImport::requestStyleSheet):
3411         * css/WebKitCSSSVGDocumentValue.cpp:
3412         (WebCore::WebKitCSSSVGDocumentValue::load):
3413         * css/WebKitCSSShaderValue.cpp:
3414         (WebCore::WebKitCSSShaderValue::cachedShader):
3415         * dom/ProcessingInstruction.cpp:
3416         (WebCore::ProcessingInstruction::checkStyleSheet):
3417         * dom/ScriptElement.cpp:
3418         (WebCore::ScriptElement::requestScript):
3419         * html/HTMLLinkElement.cpp:
3420         (WebCore::HTMLLinkElement::process):
3421         * loader/DocumentThreadableLoader.cpp:
3422         (WebCore::DocumentThreadableLoader::loadRequest):
3423         * loader/ImageLoader.cpp:
3424         (WebCore::ImageLoader::updateFromElement):
3425         * loader/LinkLoader.cpp:
3426         (WebCore::LinkLoader::loadLink):
3427         * loader/TextTrackLoader.cpp:
3428         (WebCore::TextTrackLoader::load):
3429         * loader/cache/CachedResourceLoader.cpp:
3430         (WebCore::CachedResourceLoader::requestImage):
3431         (WebCore::CachedResourceLoader::requestFont):
3432         (WebCore::CachedResourceLoader::requestTextTrack):
3433         (WebCore::CachedResourceLoader::requestShader):
3434         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
3435         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3436         (WebCore::CachedResourceLoader::requestScript):
3437         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
3438         (WebCore::CachedResourceLoader::requestSVGDocument):
3439         (WebCore::CachedResourceLoader::requestLinkResource):
3440         (WebCore::CachedResourceLoader::requestRawResource):
3441         (WebCore::CachedResourceLoader::requestResource):
3442         (WebCore::CachedResourceLoader::requestPreload):
3443         (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
3444         (WebCore):
3445         * loader/cache/CachedResourceLoader.h:
3446         (WebCore):
3447         (CachedResourceLoader):