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