1 2013-02-14 Lamarque V. Souza <Lamarque.Souza@basyskom.com>
3 Support the ch unit from css3-values
4 https://bugs.webkit.org/show_bug.cgi?id=85755
6 Reviewed by David Hyatt.
8 Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.
10 Test: fast/css/css3-ch-unit.html
12 * css/CSSCalculationValue.cpp:
13 (WebCore::unitCategory):
14 * css/CSSGrammar.y.in:
16 (WebCore::CSSParser::validUnit):
17 (WebCore::CSSParser::createPrimitiveNumericValue):
18 (WebCore::CSSParser::parseValidPrimitive):
19 (WebCore::CSSParser::detectNumberToken):
20 * css/CSSParserValues.cpp:
21 (WebCore::CSSParserValue::createCSSValue):
22 * css/CSSPrimitiveValue.cpp:
23 (WebCore::isValidCSSUnitTypeForDoubleConversion):
24 (WebCore::CSSPrimitiveValue::cleanup):
25 (WebCore::CSSPrimitiveValue::computeLengthDouble):
26 (WebCore::CSSPrimitiveValue::customCssText):
27 (WebCore::CSSPrimitiveValue::cloneForCSSOM):
28 * css/CSSPrimitiveValue.h:
29 (WebCore::CSSPrimitiveValue::isFontRelativeLength):
30 (WebCore::CSSPrimitiveValue::isLength):
31 * platform/graphics/FontMetrics.h:
32 (WebCore::FontMetrics::FontMetrics):
33 (WebCore::FontMetrics::zeroWidth):
34 (WebCore::FontMetrics::setZeroWidth):
36 (WebCore::FontMetrics::hasZeroWidth):
37 (WebCore::FontMetrics::setHasZeroWidth):
38 * platform/graphics/SimpleFontData.cpp:
39 (WebCore::SimpleFontData::platformGlyphInit):
40 * platform/graphics/SimpleFontData.h:
41 (WebCore::SimpleFontData::zeroGlyph):
42 (WebCore::SimpleFontData::setZeroGlyph):
44 * platform/graphics/qt/SimpleFontDataQt.cpp:
45 (WebCore::SimpleFontData::platformInit):
47 2013-02-14 David Kilzer <ddkilzer@apple.com>
49 [Mac] Clean up WARNING_CFLAGS
50 <http://webkit.org/b/109747>
51 <rdar://problem/13208373>
53 Reviewed by Mark Rowe.
55 * Configurations/Base.xcconfig: Use
56 GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
57 -Wshorten-64-to-32 rather than WARNING_CFLAGS.
59 2013-02-14 Christophe Dumez <ch.dumez@sisa.samsung.com>
61 Add addHTTPHeaderField() method to ResourceResponse
62 https://bugs.webkit.org/show_bug.cgi?id=109844
64 Reviewed by Adam Barth.
66 ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However,
67 ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a
68 result, the addHTTPHeaderField() functionality's implementation is duplicated in several
69 ports (at least chromium and soup).
71 This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it
72 in Chromium and Soup backends.
74 No new tests, no behavior change.
76 * platform/chromium/support/WebURLResponse.cpp:
77 (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField().
78 * platform/network/ResourceResponseBase.cpp:
79 (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code
80 from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication.
82 (WebCore::ResourceResponseBase::setHTTPHeaderField):
83 (WebCore::ResourceResponseBase::addHTTPHeaderField):
84 * platform/network/ResourceResponseBase.h:
85 (ResourceResponseBase):
86 * platform/network/soup/ResourceResponseSoup.cpp:
87 (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField().
89 2013-02-14 Philip Rogers <pdr@google.com>
91 Prevent inconsistent firstChild during document destruction
92 https://bugs.webkit.org/show_bug.cgi?id=106530
94 Reviewed by Abhishek Arya.
96 During document destruction, addChildNodesToDeletionQueue can allow a container
97 node to have an invalid first child, causing a crash. This patch updates
98 addChildNodesToDeletionQueue to maintain a valid value for firstChild() even
99 while updating its children.
101 Test: svg/custom/animateMotion-path-change-crash.svg
103 * dom/ContainerNodeAlgorithms.h:
104 (WebCore::Private::addChildNodesToDeletionQueue):
105 To ensure prevoiusSibling() is also valid, this code was slightly refactored
106 to call setPreviousSibling(0) on the next node instead of the current node.
108 2013-02-14 Julien Chaffraix <jchaffraix@webkit.org>
110 [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid
111 https://bugs.webkit.org/show_bug.cgi?id=109714
113 Reviewed by Ojan Vafai.
115 This change introduces a 2D grid representation of the grid areas. Our implementation
116 is a straight Vector of Vectors for the grid areas, each grid area able to hold an
117 arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization,
118 each grid area has enough inline storage to hold one grid item which should cover
121 In order to keep the code readable, a GridIterator was introduced to hide the new grid.
123 Refactoring, covered by existing tests.
125 * rendering/RenderGrid.cpp:
126 (RenderGrid::GridIterator):
127 (WebCore::RenderGrid::GridIterator::GridIterator):
128 (WebCore::RenderGrid::GridIterator::nextGridItem):
129 Added a mono-directional iterator. In order to be more aligned with the rest of the code,
130 this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track).
132 * rendering/RenderGrid.cpp:
133 (WebCore::RenderGrid::computePreferredLogicalWidths):
134 (WebCore::RenderGrid::layoutGridItems):
135 Updated these 2 functions to place the items on the grid and clear it at the end.
137 (WebCore::RenderGrid::computePreferredTrackWidth):
138 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
139 Updated to use the GridIterator to walk over the rows / columns.
141 (WebCore::RenderGrid::placeItemsOnGrid):
142 Added this function that inserts the grid items into the right grid area.
144 * rendering/RenderGrid.h:
145 (WebCore::RenderGrid::gridColumnCount):
146 (WebCore::RenderGrid::gridRowCount):
147 Added these helper functions.
149 2013-02-14 Sheriff Bot <webkit.review.bot@gmail.com>
151 Unreviewed, rolling out r141990.
152 http://trac.webkit.org/changeset/141990
153 https://bugs.webkit.org/show_bug.cgi?id=109850
155 ~5% regression on intl2 page cycler (Requested by kling on
158 * platform/graphics/GlyphPage.h:
159 (WebCore::GlyphPage::create):
160 (WebCore::GlyphPage::glyphDataForCharacter):
161 (WebCore::GlyphPage::glyphDataForIndex):
162 (WebCore::GlyphPage::fontDataForCharacter):
163 (WebCore::GlyphPage::setGlyphDataForIndex):
165 (WebCore::GlyphPage::copyFrom):
166 (WebCore::GlyphPage::clear):
167 (WebCore::GlyphPage::clearForFontData):
168 (WebCore::GlyphPage::GlyphPage):
169 * platform/graphics/GlyphPageTreeNode.cpp:
170 (WebCore::GlyphPageTreeNode::initializePage):
171 * rendering/svg/SVGTextRunRenderingContext.cpp:
172 (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
174 2013-02-14 Mark Pilgrim <pilgrim@chromium.org>
176 [Chromium] Move PlatformMessagePortChannel to WebCore
177 https://bugs.webkit.org/show_bug.cgi?id=109845
179 Reviewed by Adam Barth.
181 Part of a larger refactoring series; see tracking bug 106829.
183 * WebCore.gyp/WebCore.gyp:
185 * dom/default/chromium: Added.
186 * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added.
188 (WebCore::MessagePortChannel::create):
189 (WebCore::MessagePortChannel::createChannel):
190 (WebCore::MessagePortChannel::MessagePortChannel):
191 (WebCore::MessagePortChannel::~MessagePortChannel):
192 (WebCore::MessagePortChannel::entangleIfOpen):
193 (WebCore::MessagePortChannel::disentangle):
194 (WebCore::MessagePortChannel::postMessageToRemote):
195 (WebCore::MessagePortChannel::tryGetMessageFromRemote):
196 (WebCore::MessagePortChannel::close):
197 (WebCore::MessagePortChannel::isConnectedTo):
198 (WebCore::MessagePortChannel::hasPendingActivity):
199 (WebCore::MessagePortChannel::locallyEntangledPort):
200 (WebCore::PlatformMessagePortChannel::create):
201 (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
202 (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
203 (WebCore::PlatformMessagePortChannel::createChannel):
204 (WebCore::PlatformMessagePortChannel::messageAvailable):
205 (WebCore::PlatformMessagePortChannel::entangleIfOpen):
206 (WebCore::PlatformMessagePortChannel::disentangle):
207 (WebCore::PlatformMessagePortChannel::postMessageToRemote):
208 (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
209 (WebCore::PlatformMessagePortChannel::close):
210 (WebCore::PlatformMessagePortChannel::isConnectedTo):
211 (WebCore::PlatformMessagePortChannel::hasPendingActivity):
212 (WebCore::PlatformMessagePortChannel::setEntangledChannel):
213 (WebCore::PlatformMessagePortChannel::webChannelRelease):
214 * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added.
217 (PlatformMessagePortChannel):
219 2013-02-14 Chris Fleizach <cfleizach@apple.com>
221 Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard)
222 https://bugs.webkit.org/show_bug.cgi?id=90250
224 Reviewed by Eric Seidel.
226 The Leopard era checks for accessibility lists and accessibility tables can be removed now.
228 * accessibility/AccessibilityARIAGrid.cpp:
230 * accessibility/AccessibilityARIAGrid.h:
231 (AccessibilityARIAGrid):
232 (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility):
233 * accessibility/AccessibilityList.cpp:
234 (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
235 * accessibility/AccessibilityList.h:
236 * accessibility/AccessibilityTable.cpp:
237 (WebCore::AccessibilityTable::AccessibilityTable):
238 (WebCore::AccessibilityTable::init):
239 * accessibility/AccessibilityTable.h:
240 (AccessibilityTable):
241 * accessibility/mac/AXObjectCacheMac.mm:
242 (WebCore::AXObjectCache::postPlatformNotification):
243 * accessibility/mac/WebAccessibilityObjectWrapper.mm:
244 (createAccessibilityRoleMap):
246 2013-02-14 Bear Travis <betravis@adobe.com>
248 Make outside-shape the default value for shape-inside
249 https://bugs.webkit.org/show_bug.cgi?id=109605
251 Reviewed by Levi Weintraub.
253 Creating a single reference outside-shape value and setting it as the default
256 Existing tests cover the default value, just updating them to use outside-shape.
258 * rendering/style/RenderStyle.cpp:
259 (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
262 * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
265 2013-02-14 Min Qin <qinmin@chromium.org>
267 Passing alpha to DeferredImageDecoder once decoding completes
268 https://bugs.webkit.org/show_bug.cgi?id=108892
270 Reviewed by Stephen White.
272 We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
273 Added unit tests in ImageFrameGeneratorTest.
275 * platform/graphics/chromium/DeferredImageDecoder.cpp:
276 (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
277 * platform/graphics/chromium/ImageFrameGenerator.cpp:
278 (WebCore::ImageFrameGenerator::tryToScale):
279 (WebCore::ImageFrameGenerator::decode):
280 * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
281 (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
282 (WebCore::LazyDecodingPixelRef::onUnlockPixels):
283 * platform/graphics/chromium/LazyDecodingPixelRef.h:
284 (WebCore::LazyDecodingPixelRef::hasAlpha):
285 (LazyDecodingPixelRef):
286 * platform/graphics/chromium/ScaledImageFragment.cpp:
287 (WebCore::ScaledImageFragment::ScaledImageFragment):
288 * platform/graphics/chromium/ScaledImageFragment.h:
289 (WebCore::ScaledImageFragment::create):
290 (ScaledImageFragment):
291 (WebCore::ScaledImageFragment::hasAlpha):
293 2013-02-14 David Grogan <dgrogan@chromium.org>
295 IndexedDB: Add a few more histogram calls
296 https://bugs.webkit.org/show_bug.cgi?id=109762
298 Reviewed by Tony Chang.
300 A few places where commits could fail weren't being logged.
302 * Modules/indexeddb/IDBBackingStore.cpp:
303 (WebCore::IDBBackingStore::deleteDatabase):
304 (WebCore::IDBBackingStore::Transaction::commit):
306 2013-02-14 Tony Chang <tony@chromium.org>
308 Padding and border changes doesn't trigger relayout of children
309 https://bugs.webkit.org/show_bug.cgi?id=109639
311 Reviewed by Kent Tamura.
313 In RenderBlock::layoutBlock, we only relayout our children if our logical width
314 changes. This misses cases where our logical width doesn't change (i.e., padding
315 or border changes), but our content width does change.
317 This is a more general case of bug 104997.
319 Test: fast/block/dynamic-padding-border.html
321 * rendering/RenderBox.cpp:
322 (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
323 (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
324 even without border-box box sizing.
326 2013-02-14 Peter Rybin <prybin@chromium.org>
328 Web Inspector: fix closure compilation warnings caused by setVariableValue change
329 https://bugs.webkit.org/show_bug.cgi?id=109488
331 Reviewed by Pavel Feldman.
333 Annotations are fixed as required by closure compiler.
334 Parameters in Inspector.json are reordered as required.
336 * inspector/InjectedScriptExterns.js:
337 (InjectedScriptHost.prototype.setFunctionVariableValue):
338 (JavaScriptCallFrame.prototype.setVariableValue):
339 * inspector/InjectedScriptSource.js:
341 * inspector/Inspector.json:
342 * inspector/InspectorDebuggerAgent.cpp:
343 (WebCore::InspectorDebuggerAgent::setVariableValue):
344 * inspector/InspectorDebuggerAgent.h:
345 (InspectorDebuggerAgent):
347 2013-02-14 Tommy Widenflycht <tommyw@google.com>
349 MediaStream API: RTCDataChannel triggers a use-after-free
350 https://bugs.webkit.org/show_bug.cgi?id=109806
352 Reviewed by Adam Barth.
354 Making sure RTCPeerConnection::stop() is always called at least once.
355 Also making sure that RTCDataChannels state gets set to Closed correctly.
357 Hard to test in WebKit but covered by Chromium tests.
359 * Modules/mediastream/RTCDataChannel.cpp:
360 (WebCore::RTCDataChannel::stop):
361 * Modules/mediastream/RTCPeerConnection.cpp:
362 (WebCore::RTCPeerConnection::~RTCPeerConnection):
363 (WebCore::RTCPeerConnection::stop):
365 2013-02-14 Vsevolod Vlasov <vsevik@chromium.org>
367 Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
368 https://bugs.webkit.org/show_bug.cgi?id=109823
370 Reviewed by Pavel Feldman.
372 * inspector/front-end/TextEditorModel.js:
373 (WebInspector.TextEditorModel.endsWithBracketRegex.):
375 2013-02-14 Sheriff Bot <webkit.review.bot@gmail.com>
377 Unreviewed, rolling out r142820.
378 http://trac.webkit.org/changeset/142820
379 https://bugs.webkit.org/show_bug.cgi?id=109839
381 Causing crashes on chromium canaries (Requested by atwilson_
385 (WebCore::Document::updateLayout):
386 (WebCore::Document::implicitClose):
387 * rendering/RenderQuote.h:
389 * rendering/RenderView.cpp:
390 * rendering/RenderView.h:
392 2013-02-14 Mario Sanchez Prada <mario.prada@samsung.com>
394 [GTK] Missing call to g_object_ref while retrieving accessible table cells
395 https://bugs.webkit.org/show_bug.cgi?id=106903
397 Reviewed by Martin Robinson.
399 Add missing extra ref to implementation of atk_table_ref_at().
401 Test: accessibility/table-cell-for-column-and-row-crash.html
403 * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
404 (webkitAccessibleTableRefAt): This method transfers full ownership
405 over the returned AtkObject, so an extra reference is needed here.
407 2013-02-14 Mike Fenton <mifenton@rim.com>
409 [BlackBerry] Update keyboard event details to match platform details.
410 https://bugs.webkit.org/show_bug.cgi?id=109693
416 Update the keyboard event details to match the
417 platform details available.
419 Rename helper function to better describe the conversion.
421 Reviewed Internally by Nima Ghanavatian and Gen Mak.
423 * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
424 (WebCore::windowsKeyCodeForBlackBerryKeycode):
425 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
427 2013-02-08 Andrey Kosyakov <caseq@chromium.org>
429 Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
430 https://bugs.webkit.org/show_bug.cgi?id=109192
432 Reviewed by Pavel Feldman.
434 - remove frame and compositing instrumentation methods from InspectorInstrumentation;
435 - expose those methods on InspectorController instead.
438 * inspector/InspectorController.cpp:
439 (WebCore::InspectorController::didBeginFrame):
441 (WebCore::InspectorController::didCancelFrame):
442 (WebCore::InspectorController::willComposite):
443 (WebCore::InspectorController::didComposite):
444 * inspector/InspectorController.h:
445 (InspectorController):
446 * inspector/InspectorInstrumentation.cpp:
448 * inspector/InspectorInstrumentation.h:
449 (InspectorInstrumentation):
450 * testing/Internals.cpp:
451 (WebCore::Internals::emitInspectorDidBeginFrame):
452 (WebCore::Internals::emitInspectorDidCancelFrame):
454 2013-02-14 Vladislav Kaznacheev <kaznacheev@chromium.org>
456 Web Inspector: Fixed a layout regression in CanvasProfileView.
457 https://bugs.webkit.org/show_bug.cgi?id=109835
459 Reviewed by Pavel Feldman.
461 Changed splitView.css to supported nested SplitView instances.
463 * inspector/front-end/splitView.css:
464 (.split-view-vertical > .split-view-contents):
465 (.split-view-vertical > .split-view-contents-first):
466 (.split-view-vertical > .split-view-contents-first.maximized):
467 (.split-view-vertical > .split-view-contents-second):
468 (.split-view-vertical > .split-view-contents-second.maximized):
469 (.split-view-horizontal > .split-view-contents):
470 (.split-view-horizontal > .split-view-contents-first):
471 (.split-view-horizontal > .split-view-contents-first.maximized):
472 (.split-view-horizontal > .split-view-contents-second):
473 (.split-view-horizontal > .split-view-contents-second.maximized):
474 (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
475 (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
476 (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
477 (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
478 (.split-view-vertical > .split-view-resizer):
479 (.split-view-horizontal > .split-view-resizer):
481 2013-02-14 Vladislav Kaznacheev <kaznacheev@chromium.org>
483 Web Inspector: Color picker should not be available in Computed Styles pane.
484 https://bugs.webkit.org/show_bug.cgi?id=109697
486 Reviewed by Alexander Pavlov.
488 Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
489 (the ComputedStyleSidebarPane instance).
491 * inspector/front-end/StylesSidebarPane.js:
492 (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
494 2013-02-14 Yury Semikhatsky <yurys@chromium.org>
496 Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
497 https://bugs.webkit.org/show_bug.cgi?id=109811
499 Reviewed by Pavel Feldman.
501 Use const char* constant value instead of creating String from it in thread-unsafe
502 static local variable.
504 * inspector/InspectorTimelineAgent.cpp:
505 (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
507 2013-02-14 Pan Deng <pan.deng@intel.com>
509 [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
510 https://bugs.webkit.org/show_bug.cgi?id=108746.
512 Reviewed by Vsevolod Vlasov.
514 WebInspector.displayNameForURL() does not work as expected in the reload scenario,
515 for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
516 the full host name will be displayed.
517 This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
521 * inspector/front-end/ParsedURL.js:
522 (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
523 * inspector/front-end/ResourceUtils.js:
524 (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
526 2013-02-14 Alexei Filippov <alph@chromium.org>
528 Web Inspector: fix to record button remaining red after heap snapshot is taken
529 https://bugs.webkit.org/show_bug.cgi?id=109804
531 Reviewed by Yury Semikhatsky.
533 Revert part of r142243 fix. Namely heap snapshot taking button made
534 stateless as it was before.
536 * inspector/front-end/HeapSnapshotView.js:
537 (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
538 * inspector/front-end/ProfilesPanel.js:
539 (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
541 2013-02-14 Alexander Pavlov <apavlov@chromium.org>
543 Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
544 https://bugs.webkit.org/show_bug.cgi?id=109801
546 Reviewed by Yury Semikhatsky.
548 No new tests, as existing tests cover the change.
550 * inspector/InspectorAgent.cpp:
551 (WebCore::InspectorAgent::didClearWindowObjectInWorld):
552 * inspector/InspectorIndexedDBAgent.cpp:
553 (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
554 * inspector/InspectorPageAgent.cpp:
555 (WebCore::InspectorPageAgent::buildObjectForFrame):
556 * inspector/PageRuntimeAgent.cpp:
557 (WebCore::PageRuntimeAgent::notifyContextCreated):
559 2013-02-14 Sergio Villar Senin <svillar@igalia.com>
561 Add logging support to IndexedDB for non-Chromium platforms
562 https://bugs.webkit.org/show_bug.cgi?id=109809
564 Reviewed by Kentaro Hara.
566 Enable logging of IndexedDB through the StorageAPI log channel for
567 non-Chromium architectures.
569 No new tests required, we're just enabling logging for IndexedDB
570 using the currently available logging framework.
572 * Modules/indexeddb/IDBTracing.h:
574 2013-02-14 Vsevolod Vlasov <vsevik@chromium.org>
576 Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
577 https://bugs.webkit.org/show_bug.cgi?id=109704
579 Reviewed by Alexander Pavlov.
581 Replaced this methods with one line implementation on the only call site.
583 * inspector/front-end/FileSystemMapping.js:
584 * inspector/front-end/FileSystemProjectDelegate.js:
585 (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
586 (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
587 (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
588 (WebInspector.FileSystemProjectDelegate.prototype._populate):
590 2013-02-14 Anton Vayvod <avayvod@chromium.org>
592 [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
593 https://bugs.webkit.org/show_bug.cgi?id=109573
595 Reviewed by Julien Chaffraix.
597 Combine narrow descendants of the same autosizing cluster into a group that is autosized
598 with the same multiplier.
600 For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
601 a large margin individually applied (via a CSS selector), causing them all to individually
602 appear narrower than their enclosing blockContainingAllText. Rather than making each of
603 these paragraphs into a separate cluster, we want them all to share the same multiplier, as
604 if they were a single cluster.
606 Test: fast/text-autosizing/narrow-descendants-combined.html
608 * rendering/TextAutosizer.cpp:
609 (WebCore::TextAutosizer::processClusterInternal):
611 Common implementation for processCluster() and processCompositeCluster that accepts the
612 text width and whether the cluster should be autosized as parameters instead of
613 calculating it inline.
615 (WebCore::TextAutosizer::processCluster):
617 Calculates the text width for a single cluster and whether it should be autosized, then
618 calls processClusterInternal() to apply the multiplier and process the cluster's
621 (WebCore::TextAutosizer::processCompositeCluster):
623 Calculates the text width for a group of renderers and if the group should be autosized,
624 then calls processClusterInternal() repeatedly with the same multiplier to apply it and
625 process all the descendants of the group.
627 (WebCore::TextAutosizer::clusterShouldBeAutosized):
629 Calls the multiple renderers version to avoid code duplication.
631 (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
633 The multiple renderers version of clusterShouldBeAutosized.
635 * rendering/TextAutosizer.h:
637 Updated method declarations.
639 2013-02-14 Andrey Adaikin <aandrey@chromium.org>
641 Look into possibilities of typedef in webkit idl files
642 https://bugs.webkit.org/show_bug.cgi?id=52340
644 Reviewed by Kentaro Hara.
646 Add typedef support for WebKit IDL parser.
647 Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
649 Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
651 * bindings/scripts/IDLParser.pm:
652 (assertNoExtendedAttributesInTypedef):
655 (applyTypedefsForSignature):
657 (parseUnrestrictedFloatType):
658 * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
659 (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
660 (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
661 (WebDOMTestTypedefs::WebDOMTestTypedefs):
662 (WebDOMTestTypedefs::operator=):
663 (WebDOMTestTypedefs::impl):
664 (WebDOMTestTypedefs::~WebDOMTestTypedefs):
665 (WebDOMTestTypedefs::unsignedLongLongAttr):
666 (WebDOMTestTypedefs::setUnsignedLongLongAttr):
667 (WebDOMTestTypedefs::immutableSerializedScriptValue):
668 (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
669 (WebDOMTestTypedefs::func):
670 (WebDOMTestTypedefs::multiTransferList):
671 (WebDOMTestTypedefs::setShadow):
672 (WebDOMTestTypedefs::nullableArrayArg):
673 (WebDOMTestTypedefs::immutablePointFunction):
676 * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
678 (WebDOMTestTypedefs):
679 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
680 (_WebKitDOMTestTypedefsPrivate):
684 (WebKit::wrapTestTypedefs):
685 (webkit_dom_test_typedefs_finalize):
686 (webkit_dom_test_typedefs_set_property):
687 (webkit_dom_test_typedefs_get_property):
688 (webkit_dom_test_typedefs_constructor):
689 (webkit_dom_test_typedefs_class_init):
690 (webkit_dom_test_typedefs_init):
691 (webkit_dom_test_typedefs_func):
692 (webkit_dom_test_typedefs_multi_transfer_list):
693 (webkit_dom_test_typedefs_set_shadow):
694 (webkit_dom_test_typedefs_nullable_array_arg):
695 (webkit_dom_test_typedefs_immutable_point_function):
696 (webkit_dom_test_typedefs_string_array_function):
697 (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
698 (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
699 (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
700 (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
701 * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
702 (_WebKitDOMTestTypedefs):
703 (_WebKitDOMTestTypedefsClass):
704 * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
706 * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
708 (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
709 (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
710 (WebCore::JSTestTypedefsConstructor::finishCreation):
711 (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
712 (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
713 (WebCore::JSTestTypedefsConstructor::getConstructData):
714 (WebCore::JSTestTypedefsPrototype::self):
715 (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
716 (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
717 (WebCore::JSTestTypedefs::JSTestTypedefs):
718 (WebCore::JSTestTypedefs::finishCreation):
719 (WebCore::JSTestTypedefs::createPrototype):
720 (WebCore::JSTestTypedefs::destroy):
721 (WebCore::JSTestTypedefs::~JSTestTypedefs):
722 (WebCore::JSTestTypedefs::getOwnPropertySlot):
723 (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
724 (WebCore::jsTestTypedefsUnsignedLongLongAttr):
725 (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
726 (WebCore::jsTestTypedefsConstructorTestSubObj):
727 (WebCore::jsTestTypedefsConstructor):
728 (WebCore::JSTestTypedefs::put):
729 (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
730 (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
731 (WebCore::JSTestTypedefs::getConstructor):
732 (WebCore::jsTestTypedefsPrototypeFunctionFunc):
733 (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
734 (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
735 (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
736 (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
737 (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
738 (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
739 (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
740 (WebCore::isObservable):
741 (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
742 (WebCore::JSTestTypedefsOwner::finalize):
744 (WebCore::toTestTypedefs):
745 * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
748 (WebCore::JSTestTypedefs::create):
749 (WebCore::JSTestTypedefs::createStructure):
750 (WebCore::JSTestTypedefs::impl):
751 (WebCore::JSTestTypedefs::releaseImpl):
752 (WebCore::JSTestTypedefs::releaseImplIfNotNull):
753 (JSTestTypedefsOwner):
754 (WebCore::wrapperOwner):
755 (WebCore::wrapperContext):
756 (JSTestTypedefsPrototype):
757 (WebCore::JSTestTypedefsPrototype::create):
758 (WebCore::JSTestTypedefsPrototype::createStructure):
759 (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
760 (JSTestTypedefsConstructor):
761 (WebCore::JSTestTypedefsConstructor::create):
762 (WebCore::JSTestTypedefsConstructor::createStructure):
763 * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
764 * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
765 (-[DOMTestTypedefs dealloc]):
766 (-[DOMTestTypedefs finalize]):
767 (-[DOMTestTypedefs unsignedLongLongAttr]):
768 (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
769 (-[DOMTestTypedefs immutableSerializedScriptValue]):
770 (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
771 (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
772 (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
773 (-[DOMTestTypedefs immutablePointFunction]):
776 * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
778 * bindings/scripts/test/TestTypedefs.idl: Added.
779 * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
781 (WebCore::checkTypeOrDieTrying):
782 (TestTypedefsV8Internal):
783 (WebCore::TestTypedefsV8Internal::V8_USE):
784 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
785 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
786 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
787 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
788 (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
789 (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
790 (WebCore::TestTypedefsV8Internal::funcCallback):
791 (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
792 (WebCore::TestTypedefsV8Internal::setShadowCallback):
793 (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
794 (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
795 (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
796 (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
797 (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
798 (WebCore::V8TestTypedefs::constructorCallback):
799 (WebCore::ConfigureV8TestTypedefsTemplate):
800 (WebCore::V8TestTypedefs::GetRawTemplate):
801 (WebCore::V8TestTypedefs::GetTemplate):
802 (WebCore::V8TestTypedefs::HasInstance):
803 (WebCore::V8TestTypedefs::createWrapper):
804 (WebCore::V8TestTypedefs::derefObject):
805 * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
808 (WebCore::V8TestTypedefs::toNative):
809 (WebCore::V8TestTypedefs::installPerContextProperties):
810 (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
815 2013-02-13 Kentaro Hara <haraken@chromium.org>
817 [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
818 and XXXAccessorSetter() to XXXAttrSetterCustom()
819 https://bugs.webkit.org/show_bug.cgi?id=109679
821 Reviewed by Adam Barth.
823 For naming consistency and clarification.
825 No tests. No change in behavior.
827 * bindings/scripts/CodeGeneratorV8.pm:
829 (GenerateHeaderCustomCall):
830 (GenerateNormalAttrGetter):
831 (GenerateNormalAttrSetter):
832 (GenerateImplementation):
833 * bindings/scripts/test/V8/V8TestInterface.cpp:
834 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
835 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
836 * bindings/scripts/test/V8/V8TestObj.cpp:
837 (WebCore::TestObjV8Internal::customAttrAttrGetter):
838 (WebCore::TestObjV8Internal::customAttrAttrSetter):
839 * bindings/scripts/test/V8/V8TestObj.h:
841 * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
842 (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
843 * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
844 (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
845 * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
846 (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
847 (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
848 (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
849 (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
850 * bindings/v8/custom/V8ClipboardCustom.cpp:
851 (WebCore::V8Clipboard::typesAttrGetterCustom):
852 * bindings/v8/custom/V8CoordinatesCustom.cpp:
853 (WebCore::V8Coordinates::altitudeAttrGetterCustom):
854 (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
855 (WebCore::V8Coordinates::headingAttrGetterCustom):
856 (WebCore::V8Coordinates::speedAttrGetterCustom):
857 * bindings/v8/custom/V8CustomEventCustom.cpp:
858 (WebCore::V8CustomEvent::detailAttrGetterCustom):
859 * bindings/v8/custom/V8DOMWindowCustom.cpp:
860 (WebCore::V8DOMWindow::eventAttrGetterCustom):
861 (WebCore::V8DOMWindow::eventAttrSetterCustom):
862 (WebCore::V8DOMWindow::locationAttrSetterCustom):
863 (WebCore::V8DOMWindow::openerAttrSetterCustom):
864 * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
865 (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
866 (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
867 (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
868 (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
869 * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
870 (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
871 (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
872 (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
873 (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
874 * bindings/v8/custom/V8DocumentLocationCustom.cpp:
875 (WebCore::V8Document::locationAttrGetterCustom):
876 (WebCore::V8Document::locationAttrSetterCustom):
877 * bindings/v8/custom/V8EventCustom.cpp:
878 (WebCore::V8Event::dataTransferAttrGetterCustom):
879 (WebCore::V8Event::clipboardDataAttrGetterCustom):
880 * bindings/v8/custom/V8FileReaderCustom.cpp:
881 (WebCore::V8FileReader::resultAttrGetterCustom):
882 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
883 (WebCore::V8HTMLDocument::allAttrSetterCustom):
884 * bindings/v8/custom/V8HTMLElementCustom.cpp:
885 (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
886 (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
887 * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
888 (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
889 * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
890 (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
891 (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
892 (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
893 (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
894 (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
895 (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
896 * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
897 (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
898 (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
899 * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
900 (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
901 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
902 (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
903 * bindings/v8/custom/V8HistoryCustom.cpp:
904 (WebCore::V8History::stateAttrGetterCustom):
905 * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
906 (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
907 (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
908 (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
909 * bindings/v8/custom/V8LocationCustom.cpp:
910 (WebCore::V8Location::hashAttrSetterCustom):
911 (WebCore::V8Location::hostAttrSetterCustom):
912 (WebCore::V8Location::hostnameAttrSetterCustom):
913 (WebCore::V8Location::hrefAttrSetterCustom):
914 (WebCore::V8Location::pathnameAttrSetterCustom):
915 (WebCore::V8Location::portAttrSetterCustom):
916 (WebCore::V8Location::protocolAttrSetterCustom):
917 (WebCore::V8Location::searchAttrSetterCustom):
918 (WebCore::V8Location::reloadAttrGetterCustom):
919 (WebCore::V8Location::replaceAttrGetterCustom):
920 (WebCore::V8Location::assignAttrGetterCustom):
921 * bindings/v8/custom/V8MessageEventCustom.cpp:
922 (WebCore::V8MessageEvent::dataAttrGetterCustom):
923 (WebCore::V8MessageEvent::portsAttrGetterCustom):
924 * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
925 (WebCore::V8OscillatorNode::typeAttrSetterCustom):
926 * bindings/v8/custom/V8PannerNodeCustom.cpp:
927 (WebCore::V8PannerNode::panningModelAttrSetterCustom):
928 (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
929 * bindings/v8/custom/V8PopStateEventCustom.cpp:
930 (WebCore::V8PopStateEvent::stateAttrGetterCustom):
931 * bindings/v8/custom/V8SVGLengthCustom.cpp:
932 (WebCore::V8SVGLength::valueAttrGetterCustom):
933 (WebCore::V8SVGLength::valueAttrSetterCustom):
934 * bindings/v8/custom/V8TrackEventCustom.cpp:
935 (WebCore::V8TrackEvent::trackAttrGetterCustom):
936 * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
937 (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
938 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
939 (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
940 (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
942 2013-02-14 Yury Semikhatsky <yurys@chromium.org>
944 Web Inspector: extract DOM counters graph implementation into its own class
945 https://bugs.webkit.org/show_bug.cgi?id=109796
947 Reviewed by Alexander Pavlov.
949 Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
950 in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
951 Added some closure annotations and converted object literals into classes
952 with named constructors.
955 * WebCore.vcproj/WebCore.vcproj:
956 * inspector/compile-front-end.py:
957 * inspector/front-end/DOMCountersGraph.js: Added.
958 (WebInspector.DOMCountersGraph):
959 (WebInspector.DOMCounterUI):
960 (WebInspector.DOMCountersGraph.Counter):
961 (WebInspector.DOMCounterUI.prototype.setRange):
962 (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
963 (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
964 (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
965 (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
966 (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
967 (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
968 (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
969 (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
970 (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
971 (WebInspector.DOMCountersGraph.prototype._canvasHeight):
972 (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
973 (WebInspector.DOMCountersGraph.prototype._draw):
974 (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
975 (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
976 (WebInspector.DOMCountersGraph.prototype._drawMarker):
977 (WebInspector.DOMCountersGraph.prototype._drawGraph):
978 (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
979 * inspector/front-end/MemoryStatistics.js:
980 (WebInspector.MemoryStatistics):
981 (WebInspector.MemoryStatistics.Counter):
982 (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
983 (WebInspector.MemoryStatistics.prototype._createCounterUIList):
984 (WebInspector.MemoryStatistics.prototype.setTopPosition):
985 (WebInspector.MemoryStatistics.prototype._canvasHeight):
986 (WebInspector.MemoryStatistics.prototype._onRecordAdded):
987 (WebInspector.MemoryStatistics.prototype._draw):
988 (WebInspector.MemoryStatistics.prototype._onClick):
989 (WebInspector.MemoryStatistics.prototype._onMouseOut):
990 (WebInspector.MemoryStatistics.prototype._onMouseOver):
991 (WebInspector.MemoryStatistics.prototype._onMouseMove):
992 (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
993 (WebInspector.MemoryStatistics.prototype._drawMarker):
994 (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
995 * inspector/front-end/NativeMemoryGraph.js:
996 (WebInspector.NativeMemoryGraph.Counter):
997 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
998 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
999 (WebInspector.NativeMemoryGraph.prototype._draw):
1000 * inspector/front-end/TimelinePanel.js:
1001 * inspector/front-end/WebKit.qrc:
1003 2013-02-14 Aivo Paas <aivopaas@gmail.com>
1005 Updating mouse cursor on style changes without emitting fake mousemove event
1006 https://bugs.webkit.org/show_bug.cgi?id=101857
1008 Reviewed by Allan Sandfeld Jensen.
1010 Mouse cursor changes in styles used to be reflected in UI through dispatching a fake
1011 mousemove event. The old approach has some flaws: it emits a mousemove event in
1012 javascript when there is no mouse movement involved (bug 85343); the fake mousemove
1013 event is cancelled while there is a mouse button held down - cursor won't change
1014 until mouse is moved or the button released (bug 53341); it has extra overhead of
1015 using a timer which was introduced to make scrolling smoother.
1017 The new approach does not use the fake mousemove event. Instead, it uses only the logic
1018 needed for the actual cursor change to happen. This bypasses all the mousemove event related
1019 overhead. The remaining code is a stripped version of what was run through the mousemove
1020 event path. Everything that was not needed for changing a cursor is stripped off, everything
1021 that is needed, remains the same.
1023 The call to update cursor was moved up in the call tree from RenderObject::StyleDidChange
1024 to RenderObject::SetStyle right after the StyleDidChange call. This allows to any updates
1025 and style propagations in StyleDidChange to happen and makes sure that a cursor change is
1026 not missed. Previous place was at the end of RenderObject::StyleDidChange, where it could
1027 have been missed because of an early exit. For example, cursor change on mousedown/up on
1028 a text node missed the correct cursor in the first pass.
1030 Refactored EventHandler::selectCursor to not take a whole mouse event but instead work with
1031 HitTestResult so that EventHandler::updateCursor must not create a useless PlatformEvent.
1033 Fixes: https://bugs.webkit.org/show_bug.cgi?id=85343 (mousemove event on cursor change)
1034 https://bugs.webkit.org/show_bug.cgi?id=53341 (no cursor change when mouse button down)
1036 Tests: fast/events/mouse-cursor-change.html
1037 fast/events/mouse-cursor-no-mousemove.html
1039 * page/EventHandler.cpp:
1040 (WebCore::EventHandler::updateCursor): Newly added method for updating mouse cursor
1042 (WebCore::EventHandler::selectCursor):
1043 (WebCore::EventHandler::handleMouseMoveEvent):
1044 * page/EventHandler.h:
1046 * rendering/RenderObject.cpp:
1047 (WebCore::areNonIdenticalCursorListsEqual):
1049 (WebCore::areCursorsEqual):
1050 (WebCore::RenderObject::setStyle):
1051 (WebCore::RenderObject::styleDidChange):
1053 2013-02-13 Ilya Tikhonovsky <loislo@chromium.org>
1055 Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
1056 https://bugs.webkit.org/show_bug.cgi?id=109703
1058 Also we need to traverse the tree from the top root element down to the leaves.
1060 Reviewed by Yury Semikhatsky.
1062 * dom/ContainerNode.cpp:
1063 (WebCore::ContainerNode::reportMemoryUsage):
1065 (WebCore::Node::reportMemoryUsage):
1066 * inspector/InspectorMemoryAgent.cpp:
1069 2013-02-13 Hayato Ito <hayato@chromium.org>
1071 [Shadow DOM] Implements a '::distributed()' pseudo element.
1072 https://bugs.webkit.org/show_bug.cgi?id=82169
1074 Reviewed by Dimitri Glazkov.
1076 Implements a '::distributed()' pseudo element.
1077 See the Shadow DOM specification and the filed bug for the detail.
1079 - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
1080 - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
1082 For example, suppose we are given the following DOM tree and shadow tree:
1091 E content::distributed(B C) { color: green; }
1093 - <content> (Node B is distributed to this insertion point.)
1095 In this case, the style rule defined in the shadow tree matches node 'C'.
1097 A '::distributed()' pseudo element can not be a pseudo class since
1098 an intersection between matched_elements(some_selector) and
1099 matched_elements(some_selector::distributed(...)) is always an
1100 empty set. A '::distributed()' pseudo element is the first-ever
1101 *functional* pseudo element which takes a parameter, which can be
1104 This rule crosses the shadow boundary from a shadow tree to the
1105 tree of its shadow host. That means a rule which includes
1106 '::distributed()' pseudo element is defined in shadow tree, but
1107 the node which is matched in the rule, the subject of the
1108 selector, is outside of the shadow tree. Therefore, we cannot
1109 predict where the subject of the selector will be beforehand.
1110 Current CSS implementation assumes the subject of the selector
1111 must exist in the current scope.
1113 To overcome this issue, DocumentRuleSets now has a instance of
1114 ShadowDistributedRules class. A style rule will be stored in this
1115 instance if the rule includes a '::distributed()' pseudo element.
1116 This class also keeps track of each RuleSet by mapping it with a
1117 scope where the rule was originally defined. In the example, the
1118 scope is A's ShadowRoot. The scope is used to check whether the
1119 left-most matched element (in the example, it's a node 'E') exists
1122 Internally, a '::distributed' pseudo element is represented by a
1123 newly introduced 'ShadowDistributed' relation. That makes an
1124 implementation of SelectorChecker::checkSelector() much simpler.
1125 A transformation from a distributed pseudo element to a
1126 ShadowDistributed is done in parsing stage of CSS.
1128 Since '::distributed()' is an experimental feature, it's actually
1129 prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
1131 Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
1132 fast/dom/shadow/distributed-pseudo-element-match-all.html
1133 fast/dom/shadow/distributed-pseudo-element-match-descendant.html
1134 fast/dom/shadow/distributed-pseudo-element-nested.html
1135 fast/dom/shadow/distributed-pseudo-element-no-match.html
1136 fast/dom/shadow/distributed-pseudo-element-reprojection.html
1137 fast/dom/shadow/distributed-pseudo-element-scoped.html
1138 fast/dom/shadow/distributed-pseudo-element-support-selector.html
1139 fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
1140 fast/dom/shadow/distributed-pseudo-element-with-any.html
1141 fast/dom/shadow/distributed-pseudo-element.html
1143 * css/CSSGrammar.y.in:
1144 CSS Grammar was updated to support '::distrbuted(selector)'.
1145 This pseudo element is the first pseudo element which can take a selector as a parameter.
1146 * css/CSSParser.cpp:
1147 (WebCore::CSSParser::detectDashToken):
1148 (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
1149 (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1150 Here we are converting a '::distributed' pseudo element into a
1151 ShadowDistributed relation internally. To support the conversion,
1152 these rewriteSpecifiersXXX functions (formally called
1153 updateSpecifiersXXX) now return the specifiers which may be
1155 (WebCore::CSSParser::rewriteSpecifiers):
1157 * css/CSSParserValues.cpp:
1158 (WebCore::CSSParserSelector::CSSParserSelector):
1159 * css/CSSParserValues.h:
1160 (CSSParserSelector):
1161 (WebCore::CSSParserSelector::functionArgumentSelector):
1162 To hold an intermediate selector which appears at the position of an argument in
1163 functional pseudo element when parsing CSS.
1164 (WebCore::CSSParserSelector::setFunctionArgumentSelector):
1165 (WebCore::CSSParserSelector::isDistributedPseudoElement):
1166 * css/CSSSelector.cpp:
1167 Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
1168 (WebCore::CSSSelector::pseudoId):
1169 (WebCore::nameToPseudoTypeMap):
1170 (WebCore::CSSSelector::extractPseudoType):
1171 (WebCore::CSSSelector::selectorText):
1172 * css/CSSSelector.h:
1175 (WebCore::CSSSelector::isDistributedPseudoElement):
1176 (WebCore::CSSSelector::isShadowDistributed):
1177 * css/CSSSelectorList.cpp:
1179 (SelectorHasShadowDistributed):
1180 (WebCore::SelectorHasShadowDistributed::operator()):
1181 (WebCore::CSSSelectorList::hasShadowDistributedAt):
1182 * css/CSSSelectorList.h:
1184 * css/DocumentRuleSets.cpp:
1186 (WebCore::ShadowDistributedRules::addRule):
1187 Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
1188 (WebCore::ShadowDistributedRules::collectMatchRequests):
1189 (WebCore::DocumentRuleSets::resetAuthorStyle):
1190 * css/DocumentRuleSets.h:
1192 (ShadowDistributedRules):
1193 (WebCore::ShadowDistributedRules::clear):
1195 (WebCore::DocumentRuleSets::shadowDistributedRules)
1196 DocumentRuleSets owns an instance of ShadowDistributedRules.
1198 (WebCore::RuleSet::addChildRules):
1199 Updated to check whether the rule contains '::distributed()' or not.
1200 * css/SelectorChecker.cpp:
1201 (WebCore::SelectorChecker::match):
1202 Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
1203 * css/SelectorChecker.h:
1204 (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1205 Adds enum of BehaviorAtBoundary. '::distributed()' is the only
1206 rule which uses 'CrossedBoundary' since it is the only rule which
1207 crosses shadow boundaries.
1208 (SelectorCheckingContext):
1209 * css/SelectorFilter.cpp:
1210 (WebCore::SelectorFilter::collectIdentifierHashes):
1211 * css/StyleResolver.cpp:
1212 (WebCore::StyleResolver::collectMatchingRules):
1213 (WebCore::StyleResolver::matchAuthorRules):
1214 (WebCore::StyleResolver::collectMatchingRulesForList):
1215 (WebCore::StyleResolver::ruleMatches):
1216 * css/StyleResolver.h:
1218 (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
1221 * html/shadow/InsertionPoint.cpp:
1222 (WebCore::collectInsertionPointsWhereNodeIsDistributed):
1224 * html/shadow/InsertionPoint.h:
1227 2013-02-13 Kentaro Hara <haraken@chromium.org>
1229 [V8] Generate wrapper methods for custom methods
1230 https://bugs.webkit.org/show_bug.cgi?id=109678
1232 Reviewed by Adam Barth.
1234 Currently V8 directly calls back custom methods written
1235 in custom binding files. This makes it impossible for code
1236 generators to hook custom methods (e.g. Code generators cannot
1237 insert a code for FeatureObservation into custom methods).
1238 To solve the problem, we should generate wrapper methods for
1241 No tests. No change in behavior.
1243 * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
1244 file are overloaded but they are not overloaded in custom bindings confuses code
1245 generators. (For some reason, this problem hasn't appeared before this change.)
1246 * xml/XMLHttpRequest.idl: Ditto.
1248 * bindings/scripts/CodeGeneratorV8.pm:
1250 (GenerateDomainSafeFunctionGetter):
1251 (GenerateEventListenerCallback):
1252 (GenerateFunctionCallback):
1253 (GenerateNonStandardFunction):
1254 (GenerateImplementation):
1255 * bindings/scripts/test/V8/V8TestInterface.cpp:
1256 (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
1257 (TestInterfaceV8Internal):
1259 * bindings/scripts/test/V8/V8TestObj.cpp:
1260 (WebCore::TestObjV8Internal::customMethodCallback):
1261 (TestObjV8Internal):
1262 (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
1263 (WebCore::TestObjV8Internal::classMethod2Callback):
1265 (WebCore::ConfigureV8TestObjTemplate):
1266 * bindings/scripts/test/V8/V8TestObj.h:
1268 * bindings/v8/custom/V8ClipboardCustom.cpp:
1269 (WebCore::V8Clipboard::clearDataCallbackCustom):
1270 (WebCore::V8Clipboard::setDragImageCallbackCustom):
1271 * bindings/v8/custom/V8ConsoleCustom.cpp:
1272 (WebCore::V8Console::traceCallbackCustom):
1273 (WebCore::V8Console::assertCallbackCustom):
1274 (WebCore::V8Console::profileCallbackCustom):
1275 (WebCore::V8Console::profileEndCallbackCustom):
1276 * bindings/v8/custom/V8CryptoCustom.cpp:
1277 (WebCore::V8Crypto::getRandomValuesCallbackCustom):
1278 * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1279 (WebCore::V8DOMFormData::appendCallbackCustom):
1280 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1281 (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
1282 (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
1283 (WebCore::V8DOMWindow::postMessageCallbackCustom):
1284 (WebCore::V8DOMWindow::toStringCallbackCustom):
1285 (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
1286 (WebCore::V8DOMWindow::captureEventsCallbackCustom):
1287 (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
1288 (WebCore::V8DOMWindow::openCallbackCustom):
1289 (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
1290 (WebCore::V8DOMWindow::setIntervalCallbackCustom):
1291 * bindings/v8/custom/V8DataViewCustom.cpp:
1292 (WebCore::V8DataView::getInt8CallbackCustom):
1293 (WebCore::V8DataView::getUint8CallbackCustom):
1294 (WebCore::V8DataView::setInt8CallbackCustom):
1295 (WebCore::V8DataView::setUint8CallbackCustom):
1296 * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1297 (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
1298 * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1299 (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
1300 * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1301 (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
1302 * bindings/v8/custom/V8DocumentCustom.cpp:
1303 (WebCore::V8Document::evaluateCallbackCustom):
1304 (WebCore::V8Document::createTouchListCallbackCustom):
1305 * bindings/v8/custom/V8GeolocationCustom.cpp:
1306 (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
1307 (WebCore::V8Geolocation::watchPositionCallbackCustom):
1308 * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1309 (WebCore::V8HTMLAllCollection::itemCallbackCustom):
1310 (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
1311 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1312 (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
1313 (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
1314 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1315 (WebCore::V8HTMLDocument::writeCallbackCustom):
1316 (WebCore::V8HTMLDocument::writelnCallbackCustom):
1317 (WebCore::V8HTMLDocument::openCallbackCustom):
1318 * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
1319 (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
1320 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1321 (WebCore::v8HTMLImageElementConstructorCallbackCustom):
1322 (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1323 * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1324 (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
1325 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1326 (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
1327 (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
1328 (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
1329 * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
1330 (WebCore::V8HTMLSelectElement::removeCallbackCustom):
1331 * bindings/v8/custom/V8HistoryCustom.cpp:
1332 (WebCore::V8History::pushStateCallbackCustom):
1333 (WebCore::V8History::replaceStateCallbackCustom):
1334 * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1335 (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
1336 (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
1337 (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
1338 (WebCore::V8InjectedScriptHost::typeCallbackCustom):
1339 (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
1340 (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
1341 (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
1342 (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
1343 (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
1344 (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
1345 (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
1346 (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
1347 * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1348 (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
1349 (WebCore::V8InspectorFrontendHost::portCallbackCustom):
1350 (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
1351 (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
1352 (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
1353 (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
1354 * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1355 (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
1356 (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
1357 (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
1358 (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
1359 * bindings/v8/custom/V8LocationCustom.cpp:
1360 (WebCore::V8Location::reloadAccessorGetter):
1361 (WebCore::V8Location::replaceAccessorGetter):
1362 (WebCore::V8Location::assignAccessorGetter):
1363 (WebCore::V8Location::reloadCallbackCustom):
1364 (WebCore::V8Location::replaceCallbackCustom):
1365 (WebCore::V8Location::assignCallbackCustom):
1366 (WebCore::V8Location::valueOfCallbackCustom):
1367 (WebCore::V8Location::toStringCallbackCustom):
1368 * bindings/v8/custom/V8MessageEventCustom.cpp:
1369 (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
1370 (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
1371 * bindings/v8/custom/V8MessagePortCustom.cpp:
1372 (WebCore::V8MessagePort::postMessageCallbackCustom):
1373 * bindings/v8/custom/V8NodeCustom.cpp:
1374 (WebCore::V8Node::insertBeforeCallbackCustom):
1375 (WebCore::V8Node::replaceChildCallbackCustom):
1376 (WebCore::V8Node::removeChildCallbackCustom):
1377 (WebCore::V8Node::appendChildCallbackCustom):
1378 * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1379 (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
1380 * bindings/v8/custom/V8NotificationCustom.cpp:
1381 (WebCore::V8Notification::requestPermissionCallbackCustom):
1382 * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1383 (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
1384 * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1385 (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
1386 * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1387 (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
1388 * bindings/v8/custom/V8SVGLengthCustom.cpp:
1389 (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
1390 * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1391 (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
1392 (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
1393 (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
1394 (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
1395 (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
1396 (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
1397 (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
1398 (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
1399 (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
1400 (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
1401 (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
1402 (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
1403 (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
1404 (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
1405 (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
1406 (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
1407 (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
1408 (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
1409 (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
1410 (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
1411 (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
1412 (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
1413 (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
1414 (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
1415 (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
1416 (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
1417 (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
1418 * bindings/v8/custom/V8WorkerContextCustom.cpp:
1419 (WebCore::V8WorkerContext::importScriptsCallbackCustom):
1420 (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
1421 (WebCore::V8WorkerContext::setIntervalCallbackCustom):
1422 * bindings/v8/custom/V8WorkerCustom.cpp:
1423 (WebCore::V8Worker::postMessageCallbackCustom):
1424 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1425 (WebCore::V8XMLHttpRequest::openCallbackCustom):
1426 (WebCore::V8XMLHttpRequest::sendCallbackCustom):
1427 * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1428 (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
1429 (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
1430 (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
1432 2013-02-13 Praveen R Jadhav <praveen.j@samsung.com>
1434 JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
1435 https://bugs.webkit.org/show_bug.cgi?id=109542
1437 Reviewed by Kentaro Hara.
1439 "JSGenerateToJSObject" should be included in IDL files
1440 of ChannelSplitterNode and ChannelMergerNode in WebAudio.
1441 This ensures html files to access corresponding objects.
1443 * Modules/webaudio/ChannelMergerNode.idl:
1444 * Modules/webaudio/ChannelSplitterNode.idl:
1446 2013-02-13 Vineet Chaudhary <rgf748@motorola.com>
1448 [Regression] After r142831 collection-null-like-arguments.html layout test failing
1449 https://bugs.webkit.org/show_bug.cgi?id=109780
1451 Reviewed by Kentaro Hara.
1453 No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
1456 * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
1457 (WebCore::getNamedItems):
1458 (WebCore::JSHTMLAllCollection::namedItem):
1459 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1460 (WebCore::getNamedItems):
1461 (WebCore::JSHTMLFormControlsCollection::namedItem):
1462 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1463 (WebCore::getNamedItems):
1464 (WebCore::JSHTMLOptionsCollection::namedItem):
1466 2013-02-13 Soo-Hyun Choi <sh9.choi@samsung.com>
1468 Fix indentation error in MediaPlayerPrivateGStreamer.h
1469 https://bugs.webkit.org/show_bug.cgi?id=109768
1471 Reviewed by Kentaro Hara.
1473 No new tests as this patch just changes indentation style.
1475 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1476 (MediaPlayerPrivateGStreamer):
1477 (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
1478 (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
1479 (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
1480 (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1482 2013-02-13 Adam Barth <abarth@webkit.org>
1484 TokenPreloadScanner should be (mostly!) thread-safe
1485 https://bugs.webkit.org/show_bug.cgi?id=109760
1487 Reviewed by Eric Seidel.
1489 This patch makes the bulk of TokenPreloadScanner thread-safe. The one
1490 remaining wart is processPossibleBaseTag because it wants to grub
1491 around in the base tag's attributes. I have a plan for that, but it's
1492 going to need to wait for the next patch.
1494 * html/parser/HTMLPreloadScanner.cpp:
1495 (WebCore::isStartTag):
1496 (WebCore::isStartOrEndTag):
1497 (WebCore::TokenPreloadScanner::identifierFor):
1498 (WebCore::TokenPreloadScanner::inititatorFor):
1499 (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
1500 (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1501 (TokenPreloadScanner::StartTagScanner):
1502 (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
1503 (WebCore::TokenPreloadScanner::processPossibleStyleTag):
1504 (WebCore::TokenPreloadScanner::processPossibleBaseTag):
1505 (WebCore::TokenPreloadScanner::scan):
1506 (WebCore::HTMLPreloadScanner::scan):
1507 * html/parser/HTMLPreloadScanner.h:
1510 2013-02-13 Adam Barth <abarth@webkit.org>
1512 StartTagScanner should be thread-safe
1513 https://bugs.webkit.org/show_bug.cgi?id=109750
1515 Reviewed by Eric Seidel.
1517 This patch weens the StartTagScanner off AtomicString using two
1520 1) This patch creates an enum to represent the four tag names that the
1521 StartTagScanner needs to understand. Using an enum is better than
1522 using an AtomicString because we can use the enum on both the main
1523 thread and on the background thread.
1525 2) For attributes, this patch uses threadSafeMatch. We're not able to
1526 use threadSafeMatch everywhere due to performance, but using it for
1527 attributes appears to be ok becaues we only call threadSafeMatch on
1528 the attributes of "interesting" tags.
1530 I tested the performance of this patch using
1531 PerformanceTests/Parser/html-parser.html and did not see any slowdown.
1532 (There actually appeared to be a <1% speedup, but I'm attributing that
1535 * html/parser/HTMLPreloadScanner.cpp:
1536 (WebCore::identifierFor):
1538 (WebCore::inititatorFor):
1539 (WebCore::StartTagScanner::StartTagScanner):
1540 (WebCore::StartTagScanner::processAttributes):
1542 (WebCore::StartTagScanner::createPreloadRequest):
1543 (WebCore::StartTagScanner::processAttribute):
1544 (WebCore::StartTagScanner::charset):
1545 (WebCore::StartTagScanner::resourceType):
1546 (WebCore::StartTagScanner::shouldPreload):
1547 (WebCore::HTMLPreloadScanner::processToken):
1549 2013-02-13 Huang Dongsung <luxtella@company100.net>
1551 Coordinated Graphics: a long page is scaled vertically while loading.
1552 https://bugs.webkit.org/show_bug.cgi?id=109645
1554 Reviewed by Noam Rosenthal.
1556 When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
1557 vertically scaled contents. It is because there is the difference between the
1558 size of a layer and the size of CoordinatedBackingStore.
1560 Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
1561 at the moment of creating, updating and removing a tile. However, it is not
1562 necessary to send tile-related messages when the size of layer is changed.
1563 So this patch resets the size of CoordinatedBackingStore when receiving the
1564 message that is created when the size is changed: SyncLayerState.
1566 There is no current way to reliably test flicker issues.
1568 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1569 Add m_pendingSize to set m_size at the moment of flushing.
1570 After http://webkit.org/b/108294, m_pendingSize will be removed
1571 because the bug makes CoordinatedGraphicsScene execute all messages at
1572 the moment of flushing.
1573 (WebCore::CoordinatedBackingStore::setSize):
1574 (WebCore::CoordinatedBackingStore::commitTileOperations):
1575 * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1576 (CoordinatedBackingStore):
1577 * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1578 (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
1579 (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
1580 (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
1581 (WebCore::CoordinatedGraphicsScene::createTile):
1582 (WebCore::CoordinatedGraphicsScene::removeTile):
1583 (WebCore::CoordinatedGraphicsScene::updateTile):
1585 2013-02-13 Kentaro Hara <haraken@chromium.org>
1587 [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1588 and XXXAccessorSetter() to XXXAttrSetterCustom()
1589 https://bugs.webkit.org/show_bug.cgi?id=109679
1591 Reviewed by Adam Barth.
1593 For naming consistency and clarification.
1595 No tests. No change in behavior.
1597 * bindings/scripts/CodeGeneratorV8.pm:
1599 (GenerateHeaderCustomCall):
1600 (GenerateNormalAttrGetter):
1601 (GenerateNormalAttrSetter):
1602 (GenerateImplementation):
1603 * bindings/scripts/test/V8/V8TestInterface.cpp:
1604 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1605 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1606 * bindings/scripts/test/V8/V8TestObj.cpp:
1607 (WebCore::TestObjV8Internal::customAttrAttrGetter):
1608 (WebCore::TestObjV8Internal::customAttrAttrSetter):
1609 * bindings/scripts/test/V8/V8TestObj.h:
1611 * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1612 (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1613 * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1614 (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1615 * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1616 (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1617 (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1618 (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1619 (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1620 * bindings/v8/custom/V8ClipboardCustom.cpp:
1621 (WebCore::V8Clipboard::typesAttrGetterCustom):
1622 * bindings/v8/custom/V8CoordinatesCustom.cpp:
1623 (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1624 (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1625 (WebCore::V8Coordinates::headingAttrGetterCustom):
1626 (WebCore::V8Coordinates::speedAttrGetterCustom):
1627 * bindings/v8/custom/V8CustomEventCustom.cpp:
1628 (WebCore::V8CustomEvent::detailAttrGetterCustom):
1629 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1630 (WebCore::V8DOMWindow::eventAttrGetterCustom):
1631 (WebCore::V8DOMWindow::eventAttrSetterCustom):
1632 (WebCore::V8DOMWindow::locationAttrSetterCustom):
1633 (WebCore::V8DOMWindow::openerAttrSetterCustom):
1634 * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1635 (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1636 (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1637 (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1638 (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1639 * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1640 (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1641 (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1642 (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1643 (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1644 * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1645 (WebCore::V8Document::locationAttrGetterCustom):
1646 (WebCore::V8Document::locationAttrSetterCustom):
1647 * bindings/v8/custom/V8EventCustom.cpp:
1648 (WebCore::V8Event::dataTransferAttrGetterCustom):
1649 (WebCore::V8Event::clipboardDataAttrGetterCustom):
1650 * bindings/v8/custom/V8FileReaderCustom.cpp:
1651 (WebCore::V8FileReader::resultAttrGetterCustom):
1652 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1653 (WebCore::V8HTMLDocument::allAttrSetterCustom):
1654 * bindings/v8/custom/V8HTMLElementCustom.cpp:
1655 (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1656 (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1657 * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1658 (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1659 * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1660 (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1661 (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1662 (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1663 (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1664 (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1665 (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1666 * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1667 (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1668 (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1669 * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1670 (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1671 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1672 (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1673 * bindings/v8/custom/V8HistoryCustom.cpp:
1674 (WebCore::V8History::stateAttrGetterCustom):
1675 * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1676 (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1677 (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1678 (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1679 * bindings/v8/custom/V8LocationCustom.cpp:
1680 (WebCore::V8Location::hashAttrSetterCustom):
1681 (WebCore::V8Location::hostAttrSetterCustom):
1682 (WebCore::V8Location::hostnameAttrSetterCustom):
1683 (WebCore::V8Location::hrefAttrSetterCustom):
1684 (WebCore::V8Location::pathnameAttrSetterCustom):
1685 (WebCore::V8Location::portAttrSetterCustom):
1686 (WebCore::V8Location::protocolAttrSetterCustom):
1687 (WebCore::V8Location::searchAttrSetterCustom):
1688 (WebCore::V8Location::reloadAttrGetterCustom):
1689 (WebCore::V8Location::replaceAttrGetterCustom):
1690 (WebCore::V8Location::assignAttrGetterCustom):
1691 * bindings/v8/custom/V8MessageEventCustom.cpp:
1692 (WebCore::V8MessageEvent::dataAttrGetterCustom):
1693 (WebCore::V8MessageEvent::portsAttrGetterCustom):
1694 * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1695 (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1696 * bindings/v8/custom/V8PannerNodeCustom.cpp:
1697 (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1698 (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1699 * bindings/v8/custom/V8PopStateEventCustom.cpp:
1700 (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1701 * bindings/v8/custom/V8SVGLengthCustom.cpp:
1702 (WebCore::V8SVGLength::valueAttrGetterCustom):
1703 (WebCore::V8SVGLength::valueAttrSetterCustom):
1704 * bindings/v8/custom/V8TrackEventCustom.cpp:
1705 (WebCore::V8TrackEvent::trackAttrGetterCustom):
1706 * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1707 (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1708 * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1709 (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1710 (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1712 2013-02-12 Kentaro Hara <haraken@chromium.org>
1714 [V8] Generate wrapper methods for custom getters/setters
1715 https://bugs.webkit.org/show_bug.cgi?id=109666
1717 Reviewed by Adam Barth.
1719 Currently V8 directly calls back custom getters/setters written
1720 in custom binding files. This makes it impossible for code generators
1721 to hook custom getters/setters (e.g. Code generators cannot insert a code
1722 for FeatureObservation into custom getters/setters). To solve the problem,
1723 we should generate wrapper methods for custom getters/setters.
1725 No tests. No change in behavior.
1727 * bindings/scripts/CodeGeneratorV8.pm:
1728 (GenerateNormalAttrGetter):
1729 (GenerateNormalAttrSetter):
1730 (GenerateSingleBatchedAttribute):
1731 (GenerateImplementation):
1732 * bindings/scripts/test/V8/V8TestInterface.cpp:
1733 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1734 (TestInterfaceV8Internal):
1735 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1737 * bindings/scripts/test/V8/V8TestObj.cpp:
1738 (WebCore::TestObjV8Internal::customAttrAttrGetter):
1739 (TestObjV8Internal):
1740 (WebCore::TestObjV8Internal::customAttrAttrSetter):
1743 2013-02-13 Vineet Chaudhary <rgf748@motorola.com>
1745 HTMLCollections namedItem() methods should return null than undefined for empty collections.
1746 https://bugs.webkit.org/show_bug.cgi?id=104096
1748 Reviewed by Kentaro Hara.
1750 As per specification namedItem() should return null if collection is empty.
1751 Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
1753 Test: fast/dom/htmlcollection-namedItem.html
1755 * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
1756 (WebCore::getNamedItems):
1757 * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1758 (WebCore::getNamedItems):
1759 * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1760 (WebCore::getNamedItems):
1761 * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
1762 (WebCore::V8HTMLAllCollection::namedItemCallback):
1763 * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
1764 (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
1765 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
1766 (WebCore::V8HTMLOptionsCollection::namedItemCallback):
1768 2013-02-13 Tony Gentilcore <tonyg@chromium.org>
1770 Fix svg/in-html/script-write.html with threaded HTML parser
1771 https://bugs.webkit.org/show_bug.cgi?id=109495
1773 Reviewed by Eric Seidel.
1775 This patch makes the background parser's simulateTreeBuilder() more realistic.
1776 1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
1777 2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
1778 3. Support the <foreignObject> tag which enters and leaves foreign content mode.
1779 4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
1781 This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
1782 We are in foreign content if the topmost namespace is SVG or MathML.
1784 This fixes svg/in-html/script-write.html and likely others.
1786 * html/parser/BackgroundHTMLParser.cpp:
1787 (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1788 * html/parser/BackgroundHTMLParser.h:
1789 (BackgroundHTMLParser):
1790 * html/parser/CompactHTMLToken.cpp:
1791 (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
1793 * html/parser/CompactHTMLToken.h:
1797 2013-02-13 Andreas Kling <akling@apple.com>
1799 Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
1800 <http://webkit.org/b/109756>
1802 Reviewed by Antti Koivisto.
1804 Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
1805 There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
1806 objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
1808 Small progression on Membuster3, mostly for peace of mind.
1811 (WebCore::Attr::elementAttribute):
1814 * html/HTMLInputElement.cpp:
1815 (WebCore::HTMLInputElement::updateType):
1816 * html/HTMLSelectElement.cpp:
1817 (WebCore::HTMLSelectElement::parseAttribute):
1818 * svg/SVGStyledElement.cpp:
1819 (WebCore::SVGStyledElement::getPresentationAttribute):
1821 2013-02-13 Andreas Kling <akling@apple.com>
1823 Stronger ElementData pointer typing.
1824 <http://webkit.org/b/109752>
1826 Reviewed by Antti Koivisto.
1828 Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
1829 where possible. Moved some methods from base class into leaf classes that don't make sense
1832 * dom/DocumentSharedObjectPool.cpp:
1833 (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
1834 (ShareableElementDataCacheEntry):
1835 (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
1836 * dom/DocumentSharedObjectPool.h:
1837 (DocumentSharedObjectPool):
1839 (WebCore::Element::parserSetAttributes):
1840 (WebCore::Element::setAttributeNode):
1841 (WebCore::Element::removeAttributeInternal):
1842 (WebCore::Element::cloneAttributesFromElement):
1843 (WebCore::Element::createUniqueElementData):
1844 (WebCore::ShareableElementData::createWithAttributes):
1845 (WebCore::UniqueElementData::create):
1846 (WebCore::ElementData::makeUniqueCopy):
1847 (WebCore::UniqueElementData::makeShareableCopy):
1850 (ShareableElementData):
1851 (UniqueElementData):
1853 (WebCore::Element::ensureUniqueElementData):
1854 * dom/StyledElement.cpp:
1855 (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1857 2013-02-13 Antti Koivisto <antti@apple.com>
1859 Reschedule shared CFRunLoopTimer instead of reconstructing it
1860 https://bugs.webkit.org/show_bug.cgi?id=109765
1862 Reviewed by Andreas Kling and Anders Carlsson.
1864 Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
1866 * platform/mac/SharedTimerMac.mm:
1868 (WebCore::PowerObserver::restartSharedTimer):
1869 (WebCore::sharedTimer):
1870 (WebCore::setSharedTimerFireInterval):
1871 (WebCore::stopSharedTimer):
1873 2013-02-13 Emil A Eklund <eae@chromium.org>
1875 getComputedStyle returns truncated value for margin-right
1876 https://bugs.webkit.org/show_bug.cgi?id=109759
1878 Reviewed by Tony Chang.
1880 Due to an unfortunate cast in CSSComputedStyleDeclaration::
1881 getPropertyCSSValue getComputedStyle returns truncated styles
1882 for margin-right in cases where it isn't set to a specific pixel
1885 Test: fast/sub-pixel/computedstylemargin.html
1887 * css/CSSComputedStyleDeclaration.cpp:
1888 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1889 Change type of temporary value variable to float to prevent loss of precision.
1891 2013-02-13 Max Vujovic <mvujovic@adobe.com>
1893 [CSS Filters] Refactor filter outsets into a class
1894 https://bugs.webkit.org/show_bug.cgi?id=109330
1896 Reviewed by Dean Jackson.
1898 In filters related code, we're often operating on 4 ints representing the top, right,
1899 bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
1900 This patch packages those ints and their related operations into a class called
1903 Here are some signs that we should make a class to hold those 4 ints:
1904 1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
1906 2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
1907 reference. The calling code has to define 4 ints, which looks bloated.
1908 3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
1909 nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
1911 No new tests. No change in behavior. Just refactoring.
1913 * GNUmakefile.list.am:
1916 * WebCore.xcodeproj/project.pbxproj:
1917 * platform/graphics/IntRectExtent.h: Added.
1920 (WebCore::IntRectExtent::IntRectExtent):
1921 (WebCore::IntRectExtent::top):
1922 (WebCore::IntRectExtent::setTop):
1923 (WebCore::IntRectExtent::right):
1924 (WebCore::IntRectExtent::setRight):
1925 (WebCore::IntRectExtent::bottom):
1926 (WebCore::IntRectExtent::setBottom):
1927 (WebCore::IntRectExtent::left):
1928 (WebCore::IntRectExtent::setLeft):
1929 (WebCore::IntRectExtent::expandRect):
1930 (WebCore::IntRectExtent::isZero):
1931 (WebCore::operator==):
1932 (WebCore::operator!=):
1933 (WebCore::operator+=):
1934 * platform/graphics/filters/FilterOperations.cpp:
1935 (WebCore::FilterOperations::outsets):
1936 * platform/graphics/filters/FilterOperations.h:
1938 * platform/graphics/texmap/TextureMapperLayer.cpp:
1939 (WebCore::TextureMapperLayer::intermediateSurfaceRect):
1940 * rendering/FilterEffectRenderer.cpp:
1941 (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1942 (WebCore::FilterEffectRenderer::build):
1943 (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1944 * rendering/FilterEffectRenderer.h:
1945 (FilterEffectRenderer):
1946 * rendering/RenderLayer.cpp:
1947 (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1948 (WebCore::transparencyClipBox):
1949 (WebCore::RenderLayer::calculateLayerBounds):
1950 * rendering/style/RenderStyle.h:
1952 2013-02-13 Adam Barth <abarth@webkit.org>
1954 Factor HTMLTokenScanner out of HTMLPreloadScanner
1955 https://bugs.webkit.org/show_bug.cgi?id=109754
1957 Reviewed by Eric Seidel.
1959 This patch is just a mechanical separation of the per-token "scanning"
1960 logic from HTMLPreloadScanner into a separate class.
1961 HTMLPreloadScanner's job is now to keep track of the input stream and
1962 to pump the tokenizer.
1964 This factorization class will let us use HTMLTokenScanner on the
1965 background thread (once we finish making it thread-safe). In a follow
1966 up patch, I'll move HTMLTokenScanner to its own file.
1968 * html/parser/HTMLPreloadScanner.cpp:
1969 (WebCore::HTMLTokenScanner::HTMLTokenScanner):
1970 (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
1971 (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
1972 (WebCore::HTMLTokenScanner::processPossibleStyleTag):
1973 (WebCore::HTMLTokenScanner::processPossibleBaseTag):
1974 (WebCore::HTMLTokenScanner::scan):
1975 (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
1977 (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
1978 (WebCore::HTMLPreloadScanner::appendToEnd):
1979 (WebCore::HTMLPreloadScanner::scan):
1980 * html/parser/HTMLPreloadScanner.h:
1982 (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
1983 (HTMLPreloadScanner):
1986 2013-02-13 Elliott Sprehn <esprehn@chromium.org>
1988 ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
1989 https://bugs.webkit.org/show_bug.cgi?id=109616
1991 Reviewed by Julien Chaffraix.
1993 Test: fast/css-generated-content/quote-layout-focus-crash.html
1995 In some cases RenderQuote may mark itself and containing blocks as needing layout
1996 during a layout, but then one of it's containing blocks will mark itself as having
1997 finished layout so the RenderQuote and potentially some of it's ancestor renderers
1998 needLayout(), but the ancestors above those do not.
2000 Until we have proper pre-layout tasks we should just walk the list of quotes
2001 right before layout and mark all their ancestors as needing layout if the quote
2005 (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
2006 (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
2007 * rendering/RenderQuote.h:
2008 (WebCore::RenderQuote::next): Added.
2009 * rendering/RenderView.cpp:
2010 (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
2011 * rendering/RenderView.h:
2014 2013-02-13 Jer Noble <jer.noble@apple.com>
2016 EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
2017 https://bugs.webkit.org/show_bug.cgi?id=109701
2019 Reviewed by Eric Carlson.
2021 Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
2022 results in no event listener being triggered. Return a bool (like the
2023 v1 equivalent keyNeeded method) to indicate this.
2025 * html/HTMLMediaElement.cpp:
2026 (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
2027 * html/HTMLMediaElement.h:
2028 * platform/graphics/MediaPlayer.cpp:
2029 (WebCore::MediaPlayer::keyNeeded):
2030 * platform/graphics/MediaPlayer.h:
2031 (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2033 2013-02-13 Abhishek Arya <inferno@chromium.org>
2035 ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
2036 https://bugs.webkit.org/show_bug.cgi?id=107748
2038 Reviewed by Levi Weintraub.
2040 Make sure that body renderer is not an inline-block display
2041 when determining that it stretches to viewport or when paginated
2042 content needs base height.
2044 Test: fast/block/body-inline-block-crash.html
2046 * rendering/RenderBox.cpp:
2047 (WebCore::RenderBox::computeLogicalHeight):
2048 * rendering/RenderBox.h:
2049 (WebCore::RenderBox::stretchesToViewport):
2051 2013-02-13 Shawn Singh <shawnsingh@chromium.org>
2053 Fix debug assertion being triggered because we may access dirty normalFlowList.
2054 https://bugs.webkit.org/show_bug.cgi?id=109740
2056 A debug assertion in RenderLayer.h is being hit when trying to
2057 access the normalFlowList when it is dirty. This is caused by a
2058 new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
2059 but I overlooked the need to call updateLayerListsIfNeeded()
2060 recursively as well.
2062 Reviewed by Simon Fraser.
2064 No test, because there's no reliable way to test this (same as bug 85512).
2066 * rendering/RenderLayerBacking.cpp:
2067 (WebCore::hasVisibleNonCompositingDescendant):
2068 (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2070 2013-02-13 Antti Koivisto <antti@apple.com>
2072 Don't restart shared timer if both the current and the new fire time are in the past
2073 https://bugs.webkit.org/show_bug.cgi?id=109731
2075 Reviewed by Andreas Kling.
2077 In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling
2078 a zero duration timer and when stopping a timer that was ready to fire.
2080 We can skip rescheduling in this case, the shared timer will fire immediately anyway.
2082 Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
2083 for ~0.1% total CPU time reduction.
2085 * platform/ThreadTimers.cpp:
2086 (WebCore::ThreadTimers::ThreadTimers):
2087 (WebCore::ThreadTimers::setSharedTimer):
2088 (WebCore::ThreadTimers::updateSharedTimer):
2089 (WebCore::ThreadTimers::sharedTimerFiredInternal):
2090 * platform/ThreadTimers.h:
2093 2013-02-13 Zan Dobersek <zdobersek@igalia.com>
2095 The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2096 https://bugs.webkit.org/show_bug.cgi?id=109325
2098 Reviewed by Anders Carlsson.
2100 Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2101 two methods as they're provided by the C++ standard library being used.
2103 No new tests as there's no change in functionality.
2105 * Modules/mediasource/MediaSource.cpp:
2106 (WebCore::MediaSource::setDuration):
2107 * Modules/webaudio/AudioBufferSourceNode.cpp:
2108 (WebCore::AudioBufferSourceNode::totalPitchRate):
2109 * Modules/webaudio/AudioParam.cpp:
2110 (WebCore::AudioParam::setValue):
2111 * Modules/webaudio/AudioParamTimeline.cpp:
2112 (WebCore::isValidNumber):
2113 * Modules/webaudio/PannerNode.cpp:
2115 * bindings/js/IDBBindingUtilities.cpp:
2116 (WebCore::createIDBKeyFromValue):
2117 * bindings/js/JSDataViewCustom.cpp:
2118 (WebCore::getDataViewMember):
2119 * bindings/js/JSGeolocationCustom.cpp:
2120 (WebCore::setTimeout):
2121 (WebCore::setMaximumAge):
2122 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2123 (WebCore::JSHTMLOptionsCollection::setLength):
2124 * bindings/js/JSWebKitPointCustom.cpp:
2125 (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
2126 * bindings/scripts/CodeGeneratorJS.pm:
2127 (GenerateImplementation):
2128 (GenerateParametersCheck):
2129 * bindings/scripts/CodeGeneratorV8.pm:
2130 (GenerateParametersCheck):
2131 * bindings/scripts/test/JS/JSFloat64Array.cpp:
2132 (WebCore::JSFloat64Array::getByIndex):
2133 * bindings/scripts/test/JS/JSTestObj.cpp:
2134 (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2135 * bindings/scripts/test/V8/V8TestObj.cpp:
2136 (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2137 * bindings/v8/IDBBindingUtilities.cpp:
2138 (WebCore::createIDBKeyFromValue):
2139 * bindings/v8/V8Binding.cpp:
2141 (WebCore::toUInt32):
2142 * bindings/v8/custom/V8GeolocationCustom.cpp:
2143 (WebCore::createPositionOptions):
2144 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2145 (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
2146 * bindings/v8/custom/V8WebKitPointCustom.cpp:
2147 (WebCore::V8WebKitPoint::constructorCallbackCustom):
2148 * bridge/qt/qt_runtime.cpp:
2149 (JSC::Bindings::convertValueToQVariant):
2150 * css/WebKitCSSMatrix.cpp:
2151 (WebCore::WebKitCSSMatrix::translate):
2152 (WebCore::WebKitCSSMatrix::scale):
2153 (WebCore::WebKitCSSMatrix::rotate):
2154 (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2155 (WebCore::WebKitCSSMatrix::skewX):
2156 (WebCore::WebKitCSSMatrix::skewY):
2157 * html/HTMLMediaElement.cpp:
2158 (WebCore::HTMLMediaElement::percentLoaded):
2159 (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2160 (WebCore::HTMLMediaElement::endedPlayback):
2161 * html/MediaController.cpp:
2162 (MediaController::duration):
2163 * html/canvas/WebGLRenderingContext.cpp:
2165 (WebCore::WebGLRenderingContext::clearColor):
2166 * html/track/TextTrack.cpp:
2167 (WebCore::TextTrack::addCue):
2168 * html/track/TextTrackCue.cpp:
2169 (WebCore::TextTrackCue::setStartTime):
2170 (WebCore::TextTrackCue::setEndTime):
2171 * page/DOMWindow.cpp:
2172 (WebCore::DOMWindow::adjustWindowRect):
2173 * page/WindowFeatures.cpp:
2174 (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
2175 * platform/CalculationValue.cpp:
2176 (WebCore::CalculationValue::evaluate):
2177 * platform/Decimal.cpp:
2178 (WebCore::Decimal::fromDouble):
2179 * platform/Length.cpp:
2180 (WebCore::Length::nonNanCalculatedValue):
2181 * platform/audio/AudioResampler.cpp:
2182 (WebCore::AudioResampler::setRate):
2183 * platform/audio/DynamicsCompressorKernel.cpp:
2184 (WebCore::DynamicsCompressorKernel::process):
2185 * platform/audio/Reverb.cpp:
2186 (WebCore::calculateNormalizationScale):
2187 * platform/graphics/Font.cpp:
2188 (WebCore::Font::width):
2189 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2190 (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
2191 * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2192 (LoopBlinnMathUtils):
2193 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2194 (WebCore::MediaPlayerPrivateGStreamer::buffered):
2195 (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
2196 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2197 (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
2198 * platform/graphics/opentype/OpenTypeVerticalData.cpp:
2199 (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
2200 * platform/graphics/transforms/TransformationMatrix.cpp:
2201 (WebCore::clampEdgeValue):
2202 (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
2203 * platform/network/ResourceResponseBase.cpp:
2204 (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2205 * rendering/RenderMediaControlsChromium.cpp:
2206 (WebCore::paintMediaSlider):
2207 (WebCore::paintMediaVolumeSlider):
2208 * rendering/RenderThemeMac.mm:
2209 (WebCore::RenderThemeMac::paintMediaSliderTrack):
2210 * svg/SVGAnimationElement.cpp:
2211 (WebCore::SVGAnimationElement::beginElementAt):
2212 (WebCore::SVGAnimationElement::endElementAt):
2213 * svg/SVGSVGElement.cpp:
2214 (WebCore::SVGSVGElement::setCurrentTime):
2215 * svg/animation/SMILTime.h:
2216 (WebCore::SMILTime::SMILTime):
2217 * svg/animation/SVGSMILElement.cpp:
2218 (WebCore::SVGSMILElement::addBeginTime):
2219 (WebCore::SVGSMILElement::addEndTime):
2220 * xml/XPathFunctions.cpp:
2221 (WebCore::XPath::FunSubstring::evaluate):
2222 (WebCore::XPath::FunRound::round):
2223 * xml/XPathValue.cpp:
2224 (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
2225 (WebCore::XPath::Value::toString):
2227 2013-02-13 Eric Carlson <eric.carlson@apple.com>
2229 [Mac] Caption menu should have only one item selected
2230 https://bugs.webkit.org/show_bug.cgi?id=109730
2232 Reviewed by Dean Jackson.
2234 No new tests, media/track/track-user-preferences.html was modified to test the changes.
2236 * CMakeLists.txt: Add CaptionUserPreferences.cpp.
2237 * GNUmakefile.list.am: Ditto.
2238 * Target.pri: Ditto.
2239 * WebCore.gypi: Ditto.
2240 * WebCore.vcproj/WebCore.vcproj: Ditto.
2241 * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2242 * WebCore.xcodeproj/project.pbxproj: Ditto.
2244 * html/HTMLMediaElement.cpp:
2245 (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
2246 (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
2247 called because of a preferences change.
2248 (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
2249 of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
2250 (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks,
2251 not just track elements.
2252 * html/HTMLMediaElement.h:
2254 * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
2255 (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
2256 (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
2257 (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
2258 (WebCore::CaptionUserPreferences::captionPreferencesChanged):
2259 (WebCore::CaptionUserPreferences::preferredLanguages):
2260 (WebCore::CaptionUserPreferences::setPreferredLanguage):
2261 (WebCore::CaptionUserPreferences::displayNameForTrack):
2262 * page/CaptionUserPreferences.h:
2264 * page/CaptionUserPreferencesMac.h:
2265 * page/CaptionUserPreferencesMac.mm:
2266 (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
2268 (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
2270 2013-02-13 Hans Muller <hmuller@adobe.com>
2272 [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
2273 https://bugs.webkit.org/show_bug.cgi?id=107568
2275 Reviewed by Dirk Schulze.
2277 The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
2278 for each of the polygon's reflex vertices. The motivation for this change is explained
2279 here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
2281 Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
2283 * rendering/ExclusionPolygon.cpp:
2284 (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
2285 (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
2286 * rendering/ExclusionPolygon.h:
2287 (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
2288 (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
2290 2013-02-13 Adam Barth <abarth@webkit.org>
2292 CSSPreloadScanner should not depend on HTMLToken
2293 https://bugs.webkit.org/show_bug.cgi?id=109742
2295 Reviewed by Eric Seidel.
2297 There's no need for the CSSPreloadScanner to depend on HTMLToken. On
2298 the background thread, we'll likely want to use a CompactHTMLToken for
2299 preload scanning, so this dependency is problematic. This patch also
2300 teaches the CSSPreloadScanner how to scan LChars.
2302 * html/parser/CSSPreloadScanner.cpp:
2303 (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
2305 (WebCore::CSSPreloadScanner::scan):
2306 * html/parser/CSSPreloadScanner.h:
2307 (CSSPreloadScanner):
2308 * html/parser/HTMLPreloadScanner.cpp:
2309 (WebCore::HTMLPreloadScanner::processToken):
2311 2013-02-13 Julien Chaffraix <jchaffraix@webkit.org>
2313 [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
2314 https://bugs.webkit.org/show_bug.cgi?id=109100
2316 Reviewed by Ojan Vafai.
2318 Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
2320 The test uncovered several bugs in our implementation that is fixed as part
2321 of this change. They will be detailed below.
2323 * rendering/RenderGrid.cpp:
2324 (WebCore::RenderGrid::logicalContentHeightForChild):
2325 Added this function to share the code between minContentForChild and maxContentForChild.
2326 Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
2327 constrained by the previous layout's grid breadth).
2329 (WebCore::RenderGrid::minContentForChild):
2330 (WebCore::RenderGrid::maxContentForChild):
2331 Updated to use logicalContentHeightForChild.
2333 (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2334 Updated to match the specification and set max breadth to current breadth per the specification.
2335 This made us over-grow some cases in the test.
2337 (WebCore::RenderGrid::distributeSpaceToTracks):
2338 Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
2339 a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
2341 (WebCore::RenderGrid::layoutGridItems):
2342 Added a FIXME about always relaying out content sized tracks' children.
2344 * rendering/RenderGrid.h:
2345 Added logicalContentHeightForChild.
2347 2013-02-13 Adam Barth <abarth@webkit.org>
2349 Clean up some style nits in HTMLPreloadScanner
2350 https://bugs.webkit.org/show_bug.cgi?id=109738
2352 Reviewed by Tony Gentilcore.
2354 This patch just fixes a few style nits I noticed when reading through
2357 * html/parser/HTMLPreloadScanner.cpp:
2358 (WebCore::StartTagScanner::StartTagScanner):
2359 (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2360 (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2361 * html/parser/HTMLResourcePreloader.cpp:
2362 (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2363 * html/parser/HTMLResourcePreloader.h:
2365 (WebCore::PreloadRequest::PreloadRequest):
2366 (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2368 2013-02-13 Sheriff Bot <webkit.review.bot@gmail.com>
2370 Unreviewed, rolling out r142747.
2371 http://trac.webkit.org/changeset/142747
2372 https://bugs.webkit.org/show_bug.cgi?id=109746
2374 broke component build (Requested by alecf_gardening on
2377 * inspector/HeapGraphSerializer.cpp:
2378 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2379 (WebCore::HeapGraphSerializer::pushUpdate):
2380 (WebCore::HeapGraphSerializer::reportNode):
2381 (WebCore::HeapGraphSerializer::toNodeId):
2382 (WebCore::HeapGraphSerializer::addRootNode):
2383 * inspector/HeapGraphSerializer.h:
2385 (HeapGraphSerializer):
2386 * inspector/InspectorMemoryAgent.cpp:
2387 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2389 2013-02-13 Levi Weintraub <leviw@chromium.org>
2391 Bidi-Isolated inlines can cause subsequent content to not be rendered
2392 https://bugs.webkit.org/show_bug.cgi?id=108137
2394 Reviewed by Eric Seidel.
2396 First step in fixing how inline isolates behave with collapsed spaces.
2397 webkit.org/b/109624 tracks the overarching issue.
2399 Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
2401 * rendering/InlineIterator.h:
2402 (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
2403 ignoring spaces, ensure we leave it considering them again. This can result in
2404 including spaces that should be ignored following the isolate on the line, but
2405 failing to do so results in those contents not being rendered at all.
2407 2013-02-13 Andreas Kling <akling@apple.com>
2409 Better names for ElementAttributeData & subclasses.
2410 <http://webkit.org/b/109529>
2412 Reviewed by Antti Koivisto.
2414 - ElementAttributeData => ElementData
2416 Because ElementAttributeData won't be a good name once we move some non-attribute related
2417 things to this structure.
2419 - ImmutableElementAttributeData => ShareableElementData
2421 These objects can be shared with other Elements that have the same attribute name/value pairs.
2423 - MutableElementAttributeData => UniqueElementData
2425 These objects contain data that is unique to a specific Element, and cannot be shared with
2426 other Elements. This is what's important about it, not that its underlying storage is mutable.
2428 - attributeData() -> elementData()
2429 - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
2430 - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
2431 - mutableAttributeData() -> ensureUniqueElementData()
2433 Ride-along renames. Much less vague than previous names IMO.
2435 * css/StyleResolver.cpp:
2436 (WebCore::StyleResolver::canShareStyleWithControl):
2437 (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2439 (WebCore::Attr::elementAttribute):
2440 * dom/DocumentSharedObjectPool.cpp:
2441 (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
2442 (WebCore::ShareableElementDataCacheKey::operator!=):
2443 (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2444 (ShareableElementDataCacheEntry):
2445 (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2446 * dom/DocumentSharedObjectPool.h:
2447 (DocumentSharedObjectPool):
2449 (WebCore::Element::detachAttribute):
2450 (WebCore::Element::removeAttribute):
2451 (WebCore::Element::attributes):
2452 (WebCore::Element::getAttribute):
2453 (WebCore::Element::setAttribute):
2454 (WebCore::Element::setSynchronizedLazyAttribute):
2455 (WebCore::Element::setAttributeInternal):
2456 (WebCore::Element::attributeChanged):
2457 (WebCore::Element::classAttributeChanged):
2458 (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2459 (WebCore::Element::parserSetAttributes):
2460 (WebCore::Element::hasAttributes):
2461 (WebCore::Element::hasEquivalentAttributes):
2462 (WebCore::Element::setAttributeNode):
2463 (WebCore::Element::removeAttributeNode):
2464 (WebCore::Element::removeAttributeInternal):
2465 (WebCore::Element::addAttributeInternal):
2466 (WebCore::Element::getAttributeNode):
2467 (WebCore::Element::getAttributeNodeNS):
2468 (WebCore::Element::hasAttribute):
2469 (WebCore::Element::hasAttributeNS):
2470 (WebCore::Element::computeInheritedLanguage):
2471 (WebCore::Element::getURLAttribute):
2472 (WebCore::Element::getNonEmptyURLAttribute):
2473 (WebCore::Element::cloneAttributesFromElement):
2474 (WebCore::Element::createUniqueElementData):
2475 (WebCore::Element::reportMemoryUsage):
2476 (WebCore::ElementData::deref):
2477 (WebCore::ElementData::ElementData):
2478 (WebCore::sizeForShareableElementDataWithAttributeCount):
2479 (WebCore::ElementData::createShareableWithAttributes):
2480 (WebCore::ElementData::createUnique):
2481 (WebCore::ShareableElementData::ShareableElementData):
2482 (WebCore::ShareableElementData::~ShareableElementData):
2483 (WebCore::UniqueElementData::UniqueElementData):
2484 (WebCore::ElementData::makeMutableCopy):
2485 (WebCore::ElementData::makeImmutableCopy):
2486 (WebCore::ElementData::setPresentationAttributeStyle):
2487 (WebCore::ElementData::addAttribute):
2488 (WebCore::ElementData::removeAttribute):
2489 (WebCore::ElementData::isEquivalent):
2490 (WebCore::ElementData::reportMemoryUsage):
2491 (WebCore::ElementData::getAttributeItemIndexSlowCase):
2494 (WebCore::ElementData::isUnique):
2495 (ShareableElementData):
2496 (UniqueElementData):
2497 (WebCore::Element::getAttributeItemIndex):
2498 (WebCore::Element::elementData):
2500 (WebCore::Element::elementDataWithSynchronizedAttributes):
2501 (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
2502 (WebCore::Element::fastHasAttribute):
2503 (WebCore::Element::fastGetAttribute):
2504 (WebCore::Element::hasAttributesWithoutUpdate):
2505 (WebCore::Element::idForStyleResolution):
2506 (WebCore::Element::classNames):
2507 (WebCore::Element::attributeCount):
2508 (WebCore::Element::attributeItem):
2509 (WebCore::Element::getAttributeItem):
2510 (WebCore::Element::updateInvalidAttributes):
2511 (WebCore::Element::hasID):
2512 (WebCore::Element::hasClass):
2513 (WebCore::Element::ensureUniqueElementData):
2514 (WebCore::ElementData::mutableAttributeVector):
2515 (WebCore::ElementData::immutableAttributeArray):
2516 (WebCore::ElementData::length):
2517 (WebCore::ElementData::presentationAttributeStyle):
2518 (WebCore::ElementData::getAttributeItem):
2519 (WebCore::ElementData::getAttributeItemIndex):
2520 (WebCore::ElementData::attributeItem):
2522 (WebCore::Node::dumpStatistics):
2523 (WebCore::Node::compareDocumentPosition):
2524 * dom/StyledElement.cpp:
2525 (WebCore::StyledElement::updateStyleAttribute):
2526 (WebCore::StyledElement::ensureMutableInlineStyle):
2527 (WebCore::StyledElement::attributeChanged):
2528 (WebCore::StyledElement::inlineStyleCSSOMWrapper):
2529 (WebCore::StyledElement::setInlineStyleFromString):
2530 (WebCore::StyledElement::styleAttributeChanged):
2531 (WebCore::StyledElement::inlineStyleChanged):
2532 (WebCore::StyledElement::addSubresourceAttributeURLs):
2533 (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2534 * dom/StyledElement.h:
2535 (WebCore::StyledElement::inlineStyle):
2536 (WebCore::StyledElement::invalidateStyleAttribute):
2537 (WebCore::StyledElement::presentationAttributeStyle):
2538 * html/ClassList.cpp:
2539 (WebCore::ClassList::classNames):
2540 * html/HTMLInputElement.cpp:
2541 (WebCore::HTMLInputElement::updateType):
2542 * html/parser/HTMLConstructionSite.cpp:
2543 (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2544 * svg/SVGElement.cpp:
2545 (WebCore::SVGElement::updateAnimatedSVGAttribute):
2547 (WebCore::SVGElement::invalidateSVGAttributes):
2548 * xml/parser/XMLDocumentParserQt.cpp:
2549 (WebCore::XMLDocumentParser::XMLDocumentParser):
2551 2013-02-13 Christian Biesinger <cbiesinger@chromium.org>
2553 Crash when encountering <object style="resize:both;">
2554 https://bugs.webkit.org/show_bug.cgi?id=109728
2556 See also https://code.google.com/p/chromium/issues/detail?id=175535
2557 This bug can be reproduced on
2558 http://dramalink.net/tudou.y/?xink=162601060
2560 Reviewed by Eric Seidel.
2562 Test: fast/css/resize-object-crash.html
2564 * rendering/RenderWidget.cpp:
2565 (WebCore::RenderWidget::paint):
2566 Only call paintResizer() if we have a layer and canResize() is true
2568 2013-02-13 Arko Saha <arko@motorola.com>
2570 [Microdata] HTMLPropertiesCollection code cleanup
2571 https://bugs.webkit.org/show_bug.cgi?id=109721
2573 Reviewed by Ryosuke Niwa.
2575 Removed forward declaration of DOMStringList class.
2576 Removed unused findRefElements() method declaration.
2577 Also Removed unused parameter Element* from updatePropertyCache() method.
2579 No new test since no change in behavior.
2581 * html/HTMLPropertiesCollection.cpp:
2582 (WebCore::HTMLPropertiesCollection::updateNameCache):
2583 * html/HTMLPropertiesCollection.h:
2585 (HTMLPropertiesCollection):
2586 (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2588 2013-02-13 Kondapally Kalyan <kalyan.kondapally@intel.com>
2590 [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
2591 https://bugs.webkit.org/show_bug.cgi?id=109382
2593 Reviewed by Kenneth Russell.
2595 Covered by fast/canvas/webgl/oes-vertex-array-object.html
2597 This patch adds support for using Vertex Array Object with OpenGl.
2598 The patch adds support for loading necessary opengl functions
2599 and support for checking GL_ARB_vertex_array_object. The support
2600 for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
2603 * platform/graphics/OpenGLShims.cpp:
2604 (WebCore::initializeOpenGLShims):
2605 * platform/graphics/OpenGLShims.h:
2606 (_OpenGLFunctionTable):
2607 Added support for loading the necessary functions.
2609 * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2610 (WebCore::Extensions3DOpenGL::createVertexArrayOES):
2611 (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
2612 (WebCore::Extensions3DOpenGL::isVertexArrayOES):
2613 (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
2614 (WebCore::Extensions3DOpenGL::supportsExtension):
2617 (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
2618 * platform/graphics/opengl/Extensions3DOpenGL.h:
2619 (Extensions3DOpenGL):
2621 2013-02-13 Eberhard Graether <egraether@google.com>
2623 chromium: remove CompositorHUDFontAtlas
2624 https://bugs.webkit.org/show_bug.cgi?id=109328
2626 Reviewed by James Robinson.
2628 After switching the HudLayer to use skia's font rendering the
2629 CompositorHUDFontAtlas has become obsolete. This change removes
2630 this class and the related WebLayerTreeView API.
2635 * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
2636 * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
2638 2013-02-13 Dean Jackson <dino@apple.com>
2640 Small update to speech bubble for captions menu [Mac]
2641 https://bugs.webkit.org/show_bug.cgi?id=109641
2643 Reviewed by Eric Carlson
2645 Small adjustment to the embedded SVG that draws a speech bubble
2646 for the captions button. Remove a polygon that was so small
2647 it looked like a rendering error.
2649 * css/mediaControlsQuickTime.css:
2650 (video::-webkit-media-controls-toggle-closed-captions-button):
2652 2013-02-13 Dean Jackson <dino@apple.com>
2654 Clicking outside captions menu should dismiss it
2655 https://bugs.webkit.org/show_bug.cgi?id=109648
2657 Reviewed by Eric Carlson.
2659 Add a virtual override to the platform-specific
2660 defaultEventHandler to intercept any click in the controls,
2661 and hide the captions menu if it is showing.
2663 Test: media/video-controls-captions-trackmenu-hide-on-click.html
2665 * html/shadow/MediaControlsApple.cpp:
2666 (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
2667 captions menu if a click event comes in.
2668 * html/shadow/MediaControlsApple.h:
2670 2013-02-13 Tommy Widenflycht <tommyw@google.com>
2672 MediaStream API: Use the source id when creating new tracks
2673 https://bugs.webkit.org/show_bug.cgi?id=109688
2675 Reviewed by Adam Barth.
2677 This patch reuses the ids from the source when creating tracks instead of creating a new one.
2678 This was requested by the chromium port to greatly simplify their implementation.
2679 In the longer run the API should be rewritten to only use tracks instead of sources.
2681 Covered by existing tests.
2683 * platform/chromium/support/WebMediaStream.cpp:
2684 (WebKit::WebMediaStream::audioTracks):
2685 (WebKit::WebMediaStream::videoTracks):
2686 (WebKit::WebMediaStream::initialize):
2688 * platform/chromium/support/WebMediaStreamTrack.cpp:
2689 (WebKit::WebMediaStreamTrack::initialize):
2691 * platform/mediastream/MediaStreamComponent.h:
2692 (WebCore::MediaStreamComponent::create):
2693 (MediaStreamComponent):
2694 (WebCore::MediaStreamComponent::MediaStreamComponent):
2696 * platform/mediastream/MediaStreamDescriptor.h:
2697 (WebCore::MediaStreamDescriptor::create):
2698 (MediaStreamDescriptor):
2699 (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2701 2013-02-13 Eric Seidel <eric@webkit.org>
2703 Use fancy new Vector-based String constructors in the WebVTT parser
2704 https://bugs.webkit.org/show_bug.cgi?id=109619
2706 Reviewed by Benjamin Poulain.
2708 No change in behavior. Added some FIXMEs for future perf optimization.
2710 * html/track/WebVTTParser.cpp:
2711 (WebCore::WebVTTParser::constructTreeFromToken):
2713 2013-02-13 Morten Stenshorne <mstensho@opera.com>
2715 WebKit ignores column-rules wider than column-gap
2716 https://bugs.webkit.org/show_bug.cgi?id=15553
2718 Paint column rules even if they are wider than the gap.
2719 Rules wider than the gap should just overlap with column contents.
2721 Reviewed by Eric Seidel.
2723 Test: fast/multicol/rule-thicker-than-gap.html
2725 * rendering/RenderBlock.cpp:
2726 (WebCore::RenderBlock::paintColumnRules):
2728 2013-02-13 Philip Rogers <pdr@google.com>
2730 Replace SVG bitmap cache with directly-rendered SVG
2731 https://bugs.webkit.org/show_bug.cgi?id=106159
2733 Reviewed by Tim Horton.
2735 This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
2736 enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
2737 http://ie.microsoft.com/testdrive/Performance/Chalkboard/
2739 On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
2740 (http://philbit.com/SvgImagePerformance/viewport.html):
2741 without patch: ~20FPS
2744 The bitmap SVG image cache had several shortcomings:
2745 - The bitmap cache prevented viewport rendering. (WK104693)
2746 - Bitmap memory usage was high. (WK106484)
2747 - Caching animating images was expensive.
2749 This change removes almost all of the SVGImageCache implementation, replacing it with
2750 directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
2751 is a thin wrapper around an SVG image with the associated container size and scale.
2752 When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
2753 performance. This change also removes the redraw timer of the old cache, instead relying
2754 on the SVG image to notify clients if the image changes (e.g., during animations).
2756 This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
2757 at a fixed size. A test has been added for each of these bugs.
2759 Tests: svg/as-image/svg-image-scaled.html
2760 svg/as-image/svg-image-viewbox.html
2763 * GNUmakefile.list.am:
2766 * WebCore.vcproj/WebCore.vcproj:
2767 * WebCore.xcodeproj/project.pbxproj:
2768 * loader/cache/CachedImage.cpp:
2769 (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2770 (WebCore::CachedImage::setContainerSizeForRenderer):
2771 (WebCore::CachedImage::clear):
2772 (WebCore::CachedImage::changedInRect):
2774 SVG images are no longer special-cased here. When the SVG image changes, users are
2775 notified through this function, and users can then request their content to be redrawn.
2777 * svg/graphics/SVGImage.cpp:
2778 (WebCore::SVGImage::setContainerSize):
2779 (WebCore::SVGImage::drawForContainer):
2781 drawForContainer lays out the SVG content for a specific container size and renders it.
2782 The logic is fairly straightforward but a note about the scales and zooms here:
2783 the destination rect parameter is zoomed but not scaled
2784 the source rect parameter is zoomed but not scaled
2785 the context is scaled but not zoomed
2786 SVGImage::draw(...) only accepts a source and destination rect but does not consider
2787 scale or zoom. Therefore, drawForContainer removes the zoom component from the source
2788 so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
2790 (WebCore::SVGImage::drawPatternForContainer):
2792 For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
2793 has the bitmap image draw the pattern. This is necessary because drawPattern is used
2797 (WebCore::SVGImage::startAnimation):
2798 (WebCore::SVGImage::stopAnimation):
2799 (WebCore::SVGImage::resetAnimation):
2800 (WebCore::SVGImage::reportMemoryUsage):
2801 * svg/graphics/SVGImage.h:
2804 * svg/graphics/SVGImageCache.cpp:
2806 Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
2807 is stored which is just a thin wrapper around an SVG image that contains container
2808 sizing information. By combining the image and size information, the two maps of
2809 SVGImageCache have been merged into one.
2811 To make this patch easier to review, SVGImageCache still exists and works similar to
2812 how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
2813 In a followup patch it will be removed.
2815 Note: the redraw timer of SVGImageCache has been removed because animation
2816 invalidation is now properly propagated back to the image clients.
2819 (WebCore::SVGImageCache::SVGImageCache):
2820 (WebCore::SVGImageCache::~SVGImageCache):
2821 (WebCore::SVGImageCache::removeClientFromCache):
2822 (WebCore::SVGImageCache::setContainerSizeForRenderer):
2823 (WebCore::SVGImageCache::imageSizeForRenderer):
2825 Previously, this function returned the scaled image size which was incorrect. The image
2826 size is used by clients such as GraphicsContext2D to determine the source size
2827 for drawing the image. draw() accepts zoomed but not scaled values, so this has been
2830 (WebCore::SVGImageCache::imageForRenderer):
2832 A FIXME has been added here to not set the scale on every lookup. This can be improved
2833 by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
2835 * svg/graphics/SVGImageCache.h:
2838 * svg/graphics/SVGImageForContainer.cpp: Added.
2841 SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
2842 SVGImage will be longer than the image cache.
2844 (WebCore::SVGImageForContainer::size):
2846 This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
2847 but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
2848 takes zoomed but not scaled values.
2850 (WebCore::SVGImageForContainer::draw):
2851 (WebCore::SVGImageForContainer::drawPattern):
2852 * svg/graphics/SVGImageForContainer.h: Added.
2854 (SVGImageForContainer):
2856 In a future patch SVGImageForContainer can be made immutable but without a refactoring
2857 for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
2860 (WebCore::SVGImageForContainer::create):
2861 (WebCore::SVGImageForContainer::containerSize):
2862 (WebCore::SVGImageForContainer::pageScale):
2863 (WebCore::SVGImageForContainer::zoom):
2864 (WebCore::SVGImageForContainer::setSize):
2865 (WebCore::SVGImageForContainer::setZoom):
2866 (WebCore::SVGImageForContainer::setPageScale):
2867 (WebCore::SVGImageForContainer::SVGImageForContainer):
2868 (WebCore::SVGImageForContainer::destroyDecodedData):
2869 (WebCore::SVGImageForContainer::decodedSize):
2871 2013-02-12 Antti Koivisto <antti@apple.com>
2873 Avoid updating timer heap when nothing changes
2874 https://bugs.webkit.org/show_bug.cgi?id=109630
2876 Reviewed by Andreas Kling.
2878 When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow.
2879 Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the
2880 original position. We can check if anything is actually going to change before doing this work.
2882 This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
2884 * platform/Timer.cpp:
2885 (TimerHeapLessThanFunction):
2886 (WebCore::TimerHeapLessThanFunction::operator()):
2887 (WebCore::parentHeapPropertyHolds):
2889 (WebCore::childHeapPropertyHolds):
2890 (WebCore::TimerBase::hasValidHeapPosition):
2892 The code here assumes that STL heap is a normal binary heap. If there is a different implementation
2893 somewhere the assertions will catch it.
2895 (WebCore::TimerBase::updateHeapIfNeeded):
2897 Skip updating the heap if it is already valid.
2899 (WebCore::TimerBase::setNextFireTime):
2903 2013-02-13 Martin Robinson <mrobinson@igalia.com>
2905 [GTK] Remove remaining dead code from the GLib unicode backend
2906 https://bugs.webkit.org/show_bug.cgi?id=109707
2908 Reviewed by Philippe Normand.
2910 * platform/KURL.cpp:
2911 (WebCore::appendEncodedHostname):
2912 * platform/text/TextEncoding.cpp:
2913 (WebCore::TextEncoding::encode):
2914 * platform/text/TextEncodingRegistry.cpp:
2915 (WebCore::buildBaseTextCodecMaps):
2916 (WebCore::extendTextCodecMaps):
2918 2013-02-13 Xianzhu Wang <wangxianzhu@chromium.org>
2920 Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
2921 https://bugs.webkit.org/show_bug.cgi?id=108695
2923 See comments of RenderLayerModelObject::willBeDestroyed() below for details.
2925 Reviewed by Abhishek Arya.
2927 Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
2928 Unable to write a normal layout test because
2929 1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2930 2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
2932 * rendering/RenderBoxModelObject.cpp:
2933 (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
2934 * rendering/RenderLayerModelObject.cpp:
2935 (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
2937 2013-02-13 Florin Malita <fmalita@chromium.org>
2939 [SVG] OOB access in SVGListProperty::replaceItemValues()
2940 https://bugs.webkit.org/show_bug.cgi?id=109293
2942 Replacing a list property item with itself should be a no-op. This patch updates the related
2943 APIs and logic to detect the self-replace case and prevent removal of the item from the list.
2945 To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
2946 indices and a findItem() method is added to resolve an item to an index.
2948 Reviewed by Dirk Schulze.
2950 No new tests: updated existing tests cover the change.
2952 * svg/properties/SVGAnimatedListPropertyTearOff.h:
2953 (WebCore::SVGAnimatedListPropertyTearOff::findItem):
2954 (SVGAnimatedListPropertyTearOff):
2955 (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
2956 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2957 (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
2958 (SVGAnimatedPathSegListPropertyTearOff):
2959 (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
2960 Add a findItem() delegating method, and update removeItemFromList() to use the new
2963 * svg/properties/SVGListProperty.h:
2964 (WebCore::SVGListProperty::insertItemBeforeValues):
2965 (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
2966 (WebCore::SVGListProperty::replaceItemValues):
2967 (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
2969 Updated to handle the no-op case for insertItemBefore() & replaceItem().
2971 * svg/properties/SVGListPropertyTearOff.h:
2972 (WebCore::SVGListPropertyTearOff::findItem):
2973 (WebCore::SVGListPropertyTearOff::removeItemFromList):
2974 Index-based API updates.
2976 (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
2977 (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
2978 * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2979 (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
2980 Detect the self-replace case and return without removing the item from the list.
2982 * svg/properties/SVGPathSegListPropertyTearOff.h:
2983 (WebCore::SVGPathSegListPropertyTearOff::findItem):
2984 (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
2985 (SVGPathSegListPropertyTearOff):
2986 (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
2987 * svg/properties/SVGStaticListPropertyTearOff.h:
2988 (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
2989 (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
2990 Index-based API updates.
2992 2013-02-13 Takashi Sakamoto <tasak@google.com>
2994 [Refactoring] StyleResolver::State should have methods to access its member variables.
2995 https://bugs.webkit.org/show_bug.cgi?id=108563
2997 Reviewed by Antti Koivisto.
2999 Made all member variables private and added methods to access the
3000 variables, because most of the member variables are read-only.
3001 We don't need to update those read-only variables while resolving
3004 No new tests, because just refactoring.
3006 * css/SVGCSSStyleSelector.cpp:
3007 (WebCore::StyleResolver::applySVGProperty):
3008 * css/StyleResolver.cpp:
3010 (WebCore::StyleResolver::collectMatchingRules):
3011 (WebCore::StyleResolver::collectMatchingRulesForRegion):
3012 (WebCore::StyleResolver::sortAndTransferMatchedRules):
3013 (WebCore::StyleResolver::matchScopedAuthorRules):
3014 (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
3015 (WebCore::StyleResolver::matchHostRules):
3016 (WebCore::StyleResolver::matchAuthorRules):
3017 (WebCore::StyleResolver::matchUserRules):
3018 (WebCore::StyleResolver::matchUARules):
3019 (WebCore::StyleResolver::collectMatchingRulesForList):
3020 (WebCore::StyleResolver::sortMatchedRules):
3021 (WebCore::StyleResolver::matchAllRules):
3022 (WebCore::StyleResolver::State::initElement):
3023 (WebCore::StyleResolver::initElement):
3024 Modified to invoke m_state.initElement if a given element is
3025 different from current m_state's element.
3026 (WebCore::StyleResolver::State::initForStyleResolve):
3027 Moved from StyleResolver.
3028 (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3029 (WebCore::StyleResolver::canShareStyleWithControl):
3030 (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3031 (WebCore::StyleResolver::canShareStyleWithElement):
3032 (WebCore::StyleResolver::locateSharedStyle):
3033 (WebCore::StyleResolver::styleForElement):
3034 (WebCore::StyleResolver::styleForKeyframe):
3035 (WebCore::StyleResolver::keyframeStylesForAnimation):
3036 (WebCore::StyleResolver::pseudoStyleForElement):
3037 Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
3038 wrong, because it depends on previous resolving. However,
3039 initForStyleResolve will also update m_state.parentStyle. No code in
3040 pseudoStyleForElement depends on previous resolving state.
3041 (WebCore::StyleResolver::styleForPage):
3042 (WebCore::StyleResolver::defaultStyleForElement):
3043 (WebCore::StyleResolver::adjustRenderStyle):
3044 (WebCore::StyleResolver::updateFont):
3045 (WebCore::StyleResolver::pseudoStyleRulesForElement):
3046 (WebCore::StyleResolver::ruleMatches):
3047 Added one more parameter, dynamicPseudo, because dynamicPseudo in
3048 State class is just used for returning matched pseudo style from
3049 this ruleMatches to collectMatchingRulesForList. No need to keep
3050 dynamicPseudo while resolving styles.
3051 (WebCore::StyleResolver::checkRegionSelector):
3052 Removed m_pseudoStyle = NOPSEUDO, because this method uses just
3053 SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
3054 m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
3055 need to set m_pseudoStyle to be NOPSEUDO.
3056 (WebCore::StyleResolver::applyProperties):
3057 (WebCore::StyleResolver::applyMatchedProperties):
3058 (WebCore::StyleResolver::isLeftPage):
3059 (WebCore::StyleResolver::applyPropertyToStyle):
3060 (WebCore::StyleResolver::useSVGZoomRules):
3061 (WebCore::createGridTrackBreadth):
3062 (WebCore::StyleResolver::resolveVariables):
3063 (WebCore::StyleResolver::applyProperty):
3064 (WebCore::StyleResolver::cachedOrPendingFromValue):
3065 (WebCore::StyleResolver::generatedOrPendingFromValue):
3066 (WebCore::StyleResolver::setOrPendingFromValue):
3067 (WebCore::StyleResolver::cursorOrPendingFromValue):
3068 (WebCore::StyleResolver::checkForTextSizeAdjust):
3069 (WebCore::StyleResolver::initializeFontStyle):
3070 (WebCore::StyleResolver::setFontSize):
3071 (WebCore::StyleResolver::colorFromPrimitiveValue):
3072 (WebCore::StyleResolver::loadPendingSVGDocuments):
3073 (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
3074 (WebCore::StyleResolver::loadPendingShaders):
3075 (WebCore::StyleResolver::parseCustomFilterTransformParameter):
3076 (WebCore::StyleResolver::createFilterOperations):
3077 (WebCore::StyleResolver::loadPendingImage):
3078 (WebCore::StyleResolver::loadPendingImages):
3079 * css/StyleResolver.h:
3080 (WebCore::StyleResolver::style):
3081 (WebCore::StyleResolver::parentStyle):
3082 (WebCore::StyleResolver::rootElementStyle):
3083 (WebCore::StyleResolver::element):
3084 (WebCore::StyleResolver::hasParentNode):
3086 (WebCore::StyleResolver::State::State):
3088 (WebCore::StyleResolver::State::clear):
3089 Modified to use clear at the end of styleForElement.
3090 (WebCore::StyleResolver::State::document):
3091 (WebCore::StyleResolver::State::element):
3092 (WebCore::StyleResolver::State::styledElement):
3093 (WebCore::StyleResolver::State::setStyle):
3094 (WebCore::StyleResolver::State::style):
3095 (WebCore::StyleResolver::State::takeStyle):
3096 (WebCore::StyleResolver::State::ensureRuleList):
3097 (WebCore::StyleResolver::State::takeRuleList):
3098 (WebCore::StyleResolver::State::parentNode):
3099 (WebCore::StyleResolver::State::setParentStyle):
3100 (WebCore::StyleResolver::State::parentStyle):
3101 (WebCore::StyleResolver::State::rootElementStyle):
3102 (WebCore::StyleResolver::State::regionForStyling):
3103 (WebCore::StyleResolver::State::setSameOriginOnly):
3104 (WebCore::StyleResolver::State::isSameOriginOnly):
3105 (WebCore::StyleResolver::State::pseudoStyle):
3106 (WebCore::StyleResolver::State::elementLinkState):
3107 (WebCore::StyleResolver::State::distributedToInsertionPoint):
3108 (WebCore::StyleResolver::State::setElementAffectedByClassRules):
3109 (WebCore::StyleResolver::State::elementAffectedByClassRules):
3110 (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
3111 (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
3112 (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
3113 (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
3114 (WebCore::StyleResolver::State::pendingImageProperties):
3115 (WebCore::StyleResolver::State::pendingSVGDocuments):
3116 (WebCore::StyleResolver::State::setHasPendingShaders):
3117 (WebCore::StyleResolver::State::hasPendingShaders):
3118 (WebCore::StyleResolver::State::setLineHeightValue):
3119 (WebCore::StyleResolver::State::lineHeightValue):
3120 (WebCore::StyleResolver::State::setFontDirty):
3121 (WebCore::StyleResolver::State::fontDirty):
3122 (WebCore::StyleResolver::State::cacheBorderAndBackground):
3123 (WebCore::StyleResolver::State::hasUAAppearance):
3124 (WebCore::StyleResolver::State::borderData):
3125 (WebCore::StyleResolver::State::backgroundData):
3126 (WebCore::StyleResolver::State::backgroundColor):
3127 (WebCore::StyleResolver::State::fontDescription):
3128 (WebCore::StyleResolver::State::parentFontDescription):
3129 (WebCore::StyleResolver::State::setFontDescription):
3130 (WebCore::StyleResolver::State::setZoom):
3131 (WebCore::StyleResolver::State::setEffectiveZoom):
3132 (WebCore::StyleResolver::State::setTextSizeAdjust):
3133 (WebCore::StyleResolver::State::setWritingMode):
3134 (WebCore::StyleResolver::State::setTextOrientation):
3135 fontDescription, ... and setTextOrientation were moved from
3137 (WebCore::StyleResolver::State::matchedRules):
3138 (WebCore::StyleResolver::State::addMatchedRule):
3139 Moved from StyleResolver.
3140 (WebCore::StyleResolver::applyPropertyToRegularStyle):
3141 (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
3142 (WebCore::StyleResolver::fontDescription):
3143 (WebCore::StyleResolver::parentFontDescription):
3144 (WebCore::StyleResolver::setFontDescription):
3145 (WebCore::StyleResolver::setZoom):
3146 (WebCore::StyleResolver::setEffectiveZoom):
3147 (WebCore::StyleResolver::setTextSizeAdjust):
3148 (WebCore::StyleResolver::setWritingMode):
3149 (WebCore::StyleResolver::setTextOrientation):
3150 These fontDescription, ..., setTextOrientation are wrappers to
3151 invoke State's methods. StyleBuilder still depends on StyleResolver
3152 and invokes these methods. So we need these wrappers.
3154 2013-02-13 Allan Sandfeld Jensen <allan.jensen@digia.com>
3156 [Qt] window.open passes height and width parameters even if not defined in a page
3157 https://bugs.webkit.org/show_bug.cgi?id=107705
3159 Reviewed by Kenneth Rohde Christiansen.
3161 Do not override width or height of 0, as that indicates default size, and not minimum size.
3163 Tested by tst_qwebpage.
3165 * page/DOMWindow.cpp:
3166 (WebCore::DOMWindow::adjustWindowRect):
3168 2013-02-13 Rashmi Shyamasundar <rashmi.s2@samsung.com>
3170 The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
3171 https://bugs.webkit.org/show_bug.cgi?id=102656
3173 Reviewed by Dirk Schulze.
3175 The functions fillText()/strokeText() should not display anything when
3176 maxWidth is less than or equal to zero, according to spec :
3177 http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
3179 Test: fast/canvas/canvas-fillText-maxWidth-zero.html
3181 * html/canvas/CanvasRenderingContext2D.cpp:
3182 (WebCore::CanvasRenderingContext2D::drawTextInternal):
3184 2013-02-13 ChangSeok Oh <shivamidow@gmail.com>
3186 [GTK][AC] Implement basic transform animations with clutter ac backend
3187 https://bugs.webkit.org/show_bug.cgi?id=109363
3189 Reviewed by Gustavo Noronha Silva.
3191 Implement basic transform animation with clutter ac backend.
3192 GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
3193 interfaces are also similar with PlatformCAAnimation, but they are implemented
3194 with native clutter APIs. Clutter backend AC supports a basic single transform animation
3195 with this patch now, but additive animation combination and keyframe animation
3196 are not supported yet.
3198 Covered by existing animation tests.
3200 * platform/graphics/clutter/GraphicsLayerActor.cpp:
3201 (graphicsLayerActorSetTransform):
3202 * platform/graphics/clutter/GraphicsLayerClutter.cpp:
3203 (WebCore::isTransformTypeTransformationMatrix):
3205 (WebCore::isTransformTypeFloatPoint3D):
3206 (WebCore::isTransformTypeNumber):
3207 (WebCore::getTransformFunctionValue):
3208 (WebCore::getValueFunctionNameForTransformOperation):
3209 (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
3210 (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
3211 (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
3212 * platform/graphics/clutter/GraphicsLayerClutter.h:
3213 (GraphicsLayerClutter):
3214 * platform/graphics/clutter/PlatformClutterAnimation.cpp:
3215 (WebCore::toClutterActorPropertyString):
3217 (WebCore::PlatformClutterAnimation::supportsValueFunction):
3218 (WebCore::PlatformClutterAnimation::duration):
3219 (WebCore::PlatformClutterAnimation::setDuration):
3220 (WebCore::PlatformClutterAnimation::setAdditive):
3221 (WebCore::PlatformClutterAnimation::valueFunction):
3222 (WebCore::PlatformClutterAnimation::setValueFunction):
3223 (WebCore::PlatformClutterAnimation::setFromValue):
3224 (WebCore::PlatformClutterAnimation::setToValue):
3225 (WebCore::PlatformClutterAnimation::timeline):
3226 (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
3227 (WebCore::PlatformClutterAnimation::addOpacityTransition):
3228 (WebCore::PlatformClutterAnimation::addTransformTransition):
3229 (WebCore::PlatformClutterAnimation::addAnimationForKey):
3230 * platform/graphics/clutter/PlatformClutterAnimation.h:
3231 (PlatformClutterAnimation):
3233 2013-02-13 Ilya Tikhonovsky <loislo@chromium.org>
3235 Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
3236 https://bugs.webkit.org/show_bug.cgi?id=109554
3238 In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
3239 can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
3241 Drive by fix: I introduced a client interface for the HeapGraphSerializer.
3242 It helps me to do the tests for the serializer.
3244 Reviewed by Yury Semikhatsky.
3246 It is covered by newly added tests in TestWebKitAPI.
3248 * inspector/HeapGraphSerializer.cpp:
3249 (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3250 (WebCore::HeapGraphSerializer::pushUpdate):
3251 (WebCore::HeapGraphSerializer::reportNode):
3252 (WebCore::HeapGraphSerializer::toNodeId):
3253 (WebCore::HeapGraphSerializer::addRootNode):
3254 * inspector/HeapGraphSerializer.h:
3255 (HeapGraphSerializer):
3257 (WebCore::HeapGraphSerializer::Client::~Client):
3258 * inspector/InspectorMemoryAgent.cpp:
3260 (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3262 2013-02-13 Yury Semikhatsky <yurys@chromium.org>
3264 Web Inspector: add experimental native heap graph to Timeline panel
3265 https://bugs.webkit.org/show_bug.cgi?id=109687
3267 Reviewed by Alexander Pavlov.
3269 Added experimentatl support for native heap graph on the Timeline panel.
3270 Native memory usage data is collected after each top level task and can
3271 be displayed instead of DOM counters graph on the Timeline panel if
3272 corresponding experiment is enabled in the inspector settings.
3274 * inspector/Inspector.json:
3275 * inspector/InspectorController.cpp:
3276 (WebCore::InspectorController::InspectorController):
3277 * inspector/InspectorTimelineAgent.cpp:
3278 (TimelineAgentState):
3279 (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
3281 (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
3282 (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
3283 (WebCore::InspectorTimelineAgent::setDOMCounters):
3284 (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
3285 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3286 * inspector/InspectorTimelineAgent.h:
3288 (WebCore::InspectorTimelineAgent::create):
3289 (InspectorTimelineAgent):
3290 * inspector/WorkerInspectorController.cpp:
3291 (WebCore::WorkerInspectorController::WorkerInspectorController):
3292 * inspector/front-end/MemoryStatistics.js:
3293 (WebInspector.MemoryStatistics):
3294 * inspector/front-end/NativeMemoryGraph.js:
3295 (WebInspector.NativeMemoryGraph):
3296 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
3297 (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
3298 * inspector/front-end/Settings.js:
3299 (WebInspector.ExperimentsSettings):
3300 * inspector/front-end/TimelinePanel.js:
3302 2013-02-13 Vladislav Kaznacheev <kaznacheev@chromium.org>
3304 Web Inspector: Fixed colorpicker editing and scrolling.
3305 https://bugs.webkit.org/show_bug.cgi?id=109434.
3307 Reviewed by Alexander Pavlov.
3309 The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
3310 SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
3311 Added a special CSS class to mark the scroll target.
3315 * inspector/front-end/SplitView.js:
3316 (WebInspector.SplitView):
3317 * inspector/front-end/StylesSidebarPane.js:
3318 (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
3319 * inspector/front-end/TabbedPane.js:
3320 (WebInspector.TabbedPane):
3322 2013-02-13 Andrey Lushnikov <lushnikov@chromium.org>
3324 Web Inspector: fix js compilation warnings in TextPrompt
3325 https://bugs.webkit.org/show_bug.cgi?id=109685
3327 Reviewed by Alexander Pavlov.
3329 Mark last argument of _applySuggestion function as optional.
3331 No new tests: no change in behaviour.
3333 * inspector/front-end/TextPrompt.js:
3335 2013-02-13 Pablo Flouret <pablof@motorola.com>
3337 Implement css-conditional's CSS.supports()
3338 https://bugs.webkit.org/show_bug.cgi?id=100324
3340 Reviewed by Antti Koivisto.
3342 http://dev.w3.org/csswg/css3-conditional/#the-css-interface
3344 The supports() method provides the css @supports rule's corresponding
3346 The patch also adds the CSS interface on DOMWindow, which holds "useful
3347 CSS-related functions that do not belong elsewhere". This is where
3350 Test: css3/supports-dom-api.html
3353 * DerivedSources.cpp:
3354 * DerivedSources.make:
3355 * DerivedSources.pri:
3356 * GNUmakefile.list.am:
3360 * WebCore.vcproj/WebCore.vcproj:
3361 * WebCore.xcodeproj/project.pbxproj:
3362 * bindings/gobject/GNUmakefile.am:
3363 * bindings/scripts/CodeGeneratorGObject.pm:
3365 Add DOMWindowCSS.* to the build systems.
3367 * bindings/scripts/CodeGenerator.pm:
3369 Handle CSS prefixes correctly (s/cSS/css/).
3371 * css/CSSGrammar.y.in:
3372 * css/CSSParser.cpp:
3373 (WebCore::CSSParser::CSSParser):
3374 (WebCore::CSSParser::parseSupportsCondition):
3375 (WebCore::CSSParser::detectAtToken):
3377 webkit_supports_condition parses just the condition part of an
3378 @supports rule and evaluates it, outputting whether the condition
3379 is supported or not.
3381 * css/CSSAllInOne.cpp:
3382 * css/DOMWindowCSS.cpp: Added.
3383 * css/DOMWindowCSS.h: Added.
3384 * css/DOMWindowCSS.idl: Added.
3385 The CSS interface object.
3387 * page/DOMWindow.cpp:
3388 (WebCore::DOMWindow::css):
3390 * page/DOMWindow.idl:
3393 2013-02-13 Vladislav Kaznacheev <kaznacheev@chromium.org>
3395 Web Inspector: Simplify SplitView to rely more on CSS
3396 https://bugs.webkit.org/show_bug.cgi?id=109426
3398 Reviewed by Vsevolod Vlasov.
3400 Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
3401 should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
3406 * inspector/front-end/SidebarView.js:
3407 (WebInspector.SidebarView):
3408 * inspector/front-end/SplitView.js:
3409 (WebInspector.SplitView):
3410 (WebInspector.SplitView.prototype._innerSetVertical):
3411 (WebInspector.SplitView.prototype.setSecondIsSidebar):
3412 (WebInspector.SplitView.prototype._showOnly):
3413 (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3414 * inspector/front-end/TimelinePanel.js:
3415 * inspector/front-end/cssNamedFlows.css:
3416 (.css-named-flow-collections-view .split-view-sidebar):
3417 (.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
3418 (.css-named-flow-collections-view .split-view-sidebar .selection):
3419 (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
3420 (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
3421 * inspector/front-end/splitView.css:
3422 (.split-view-contents.maximized):
3423 (.split-view-vertical .split-view-contents):
3424 (.split-view-vertical .split-view-contents-first):
3425 (.split-view-vertical .split-view-contents-first.maximized):
3426 (.split-view-vertical .split-view-contents-second):
3427 (.split-view-vertical .split-view-contents-second.maximized):
3428 (.split-view-horizontal .split-view-contents):
3429 (.split-view-horizontal .split-view-contents-first):
3430 (.split-view-horizontal .split-view-contents-first.maximized):
3431 (.split-view-horizontal .split-view-contents-second):
3432 (.split-view-horizontal .split-view-contents-second.maximized):
3433 (.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
3434 (.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
3435 (.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
3436 (.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
3437 (.split-view-vertical .split-view-resizer):
3438 (.split-view-horizontal .split-view-resizer):
3439 * inspector/front-end/timelinePanel.css:
3440 (.timeline.split-view-vertical .split-view-resizer):
3441 (#timeline-container .split-view-sidebar):
3443 2013-02-13 Kentaro Hara <haraken@chromium.org>
3445 Unreviewed, rolling out r142730.
3446 http://trac.webkit.org/changeset/142730
3447 https://bugs.webkit.org/show_bug.cgi?id=109666
3449 chromium browser tests are failing
3451 * bindings/scripts/CodeGeneratorV8.pm:
3452 (GenerateNormalAttrGetter):
3453 (GenerateNormalAttrSetter):
3454 (GenerateSingleBatchedAttribute):
3455 (GenerateImplementation):
3456 * bindings/scripts/test/V8/V8TestInterface.cpp:
3457 (TestInterfaceV8Internal):
3459 * bindings/scripts/test/V8/V8TestObj.cpp:
3462 2013-02-13 Tamas Czene <tczene@inf.u-szeged.hu>
3464 OpenCL implementation of Flood SVG filters.
3465 https://bugs.webkit.org/show_bug.cgi?id=109580
3467 Reviewed by Zoltan Herczeg.
3470 * platform/graphics/filters/FEFlood.h:
3472 * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
3474 (WebCore::PROGRAM_STR):
3475 (WebCore::FilterContextOpenCL::compileFill):
3476 (WebCore::FilterContextOpenCL::fill):
3477 * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
3478 (WebCore::FilterContextOpenCL::FilterContextOpenCL):
3479 (FilterContextOpenCL):
3480 * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
3482 (WebCore::FEFlood::platformApplyOpenCL):
3484 2013-02-13 Mike West <mkwst@chromium.org>
3486 location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
3487 https://bugs.webkit.org/show_bug.cgi?id=43891
3489 Reviewed by Adam Barth.
3491 Other browsers (IE, Firefox, and Opera) throw an exception when accessing
3492 properties of a Location object across origins, as the spec suggests[1].
3493 WebKit is currently the outlier.
3495 This has a few negative effects: developers are forced to hack around
3496 access violations in two ways rather than having a single code path, and
3497 (more annoyingly) developers are unable to avoid generating the error
3498 message. See every ad on the internet for the effect on the console. :)
3500 This patch adds a SECURITY_ERR exception to these access violations,
3501 which is the first step towards getting rid of the console spam. Getting
3502 rid of the message entirely will require a solution to
3503 http://wkbug.com/98050.
3505 A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
3506 trailed off without reaching conclusion. A more recent thread reached
3507 agreement that this patch seems like a reasonable thing to do[3].
3509 This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892
3511 [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
3512 [2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
3513 [2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html
3515 * bindings/js/JSLocationCustom.cpp:
3516 (WebCore::JSLocation::getOwnPropertySlotDelegate):
3518 2013-02-13 Andrew Wilson <atwilson@chromium.org>
3520 Unreviewed Chromium gyp-file cleanup after glib backend removal.
3521 https://bugs.webkit.org/show_bug.cgi?id=109672
3523 Removed references to GLib unicode backend:
3527 2013-02-12 Kentaro Hara <haraken@chromium.org>
3529 [V8] Generate wrapper methods for custom getters/setters
3530 https://bugs.webkit.org/show_bug.cgi?id=109666
3532 Reviewed by Adam Barth.
3534 Currently V8 directly calls back custom getters/setters written
3535 in custom binding files. This makes it impossible for code generators
3536 to hook custom getters/setters (e.g. Code generators cannot insert a code
3537 for FeatureObservation into custom getters/setters). We should generate
3538 wrapper methods for custom getters/setters.
3540 In the future, I will insert TRACE_EVENT() macros into these wrapper methods
3541 to profile DOM getters/setters/methods.
3543 * bindings/scripts/CodeGeneratorV8.pm:
3544 (GenerateNormalAttrGetter):
3545 (GenerateNormalAttrSetter):
3546 (GenerateSingleBatchedAttribute):
3547 (GenerateImplementation):
3548 * bindings/scripts/test/V8/V8TestInterface.cpp:
3549 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
3550 (TestInterfaceV8Internal):
3551 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
3553 * bindings/scripts/test/V8/V8TestObj.cpp:
3554 (WebCore::TestObjV8Internal::customAttrAttrGetter):
3555 (TestObjV8Internal):
3556 (WebCore::TestObjV8Internal::customAttrAttrSetter):
3559 2013-02-13 Sheriff Bot <webkit.review.bot@gmail.com>
3561 Unreviewed, rolling out r142611.
3562 http://trac.webkit.org/changeset/142611
3563 https://bugs.webkit.org/show_bug.cgi?id=109668
3565 Suggest box is not shown anymore when user types "window." in
3566 inspector console. (Requested by vsevik on #webkit).
3568 * inspector/front-end/TextPrompt.js:
3569 (WebInspector.TextPrompt.prototype.complete):
3571 2013-02-13 Kentaro Hara <haraken@chromium.org>
3573 [V8] There is no XXXConstructor that requires a custom getter
3574 https://bugs.webkit.org/show_bug.cgi?id=109667
3576 Reviewed by Adam Barth.
3578 Currently '[Custom] attribute XXXConstructor xxx' generates
3579 XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
3580 In addition, it does make no sense to generate XXXAttrGetter() for such cases.
3581 We can remove the logic from CodeGeneratorV8.pm.
3583 * bindings/scripts/CodeGeneratorV8.pm:
3584 (GenerateSingleBatchedAttribute):
3586 2013-02-12 Hajime Morrita <morrita@google.com>
3588 [Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
3589 https://bugs.webkit.org/show_bug.cgi?id=109642
3591 Reviewed by Kent Tamura.
3593 InternalSettings.setShadowDOMEnabled() shouldn't be called after
3594 any relevant DOM bindings are touched. However for fuzzers, it
3595 isn't trivial to regulate its behavior.
3597 This change whitelists the URL of running test for prevent
3598 unintended API calls. This doesn't hurt the Internals usability
3599 since the API is called from just a couple of tests and the number
3600 isn't expected to grow.
3602 Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html
3604 * testing/InternalSettings.cpp:
3605 (WebCore::urlIsWhitelisted):
3607 (WebCore::InternalSettings::setShadowDOMEnabled):
3609 2013-02-12 Vsevolod Vlasov <vsevik@chromium.org>
3611 Web Inspector: Introduce version controller to migrate settings versions.
3612 https://bugs.webkit.org/show_bug.cgi?id=109553
3614 Reviewed by Yury Semikhatsky.
3616 This patch introduces version controller that could be used to migrate inspector settings.
3618 Test: inspector/version-controller.html
3620 * inspector/front-end/Settings.js:
3621 (WebInspector.Settings):
3622 (WebInspector.VersionController):
3623 (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
3624 (WebInspector.VersionController.prototype._updateVersionFrom0To1):
3625 * inspector/front-end/inspector.js:
3627 2013-02-12 Martin Robinson <mrobinson@igalia.com>
3629 [GTK] Remove the GLib unicode backend
3630 https://bugs.webkit.org/show_bug.cgi?id=109627
3632 Reviewed by Benjamin Poulain.
3634 Remove references to the GLib unicode backend from WebCore.
3636 * GNUmakefile.list.am: Update the source list.
3637 * platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
3638 * platform/text/gtk/TextCodecGtk.cpp: Removed.
3639 * platform/text/gtk/TextCodecGtk.h: Removed.
3641 2013-02-12 Chris Fleizach <cfleizach@apple.com>
3643 AX: crash when accessing AccessibilityScrollbar after page has been unloaded
3644 https://bugs.webkit.org/show_bug.cgi?id=109524
3646 Reviewed by Ryosuke Niwa.
3648 AX clients can hold onto AccesibilityScrollbar references that reference parent
3649 AccessibilityScrollViews that have already gone away.
3651 AccessibilityScrollView is not calling detachFromParent after it is removed, which
3652 leads to a crash. The fix is to clearChildren() when an object is deallocated.
3654 I could not create a test because the crash only manifests over multiple page loads.
3656 * accessibility/AccessibilityObject.cpp:
3657 (WebCore::AccessibilityObject::detach):
3659 2013-02-12 Hayato Ito <hayato@chromium.org>
3661 Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
3662 https://bugs.webkit.org/show_bug.cgi?id=109650
3664 Reviewed by Dimitri Glazkov.
3666 Set FocusEvent.relatedTarget in its constructor so that each
3667 EventDispatchMediator can use FocusEvent.relatedTarget rather than
3668 its redundant m_{old,new}FocusedNode member variable.
3670 I've also removed FIXME comments, mentioning bug 109261, since I
3671 can not reproduce the issue.
3673 No new tests. No change in functionality.
3675 * dom/FocusEvent.cpp:
3676 (WebCore::FocusEventDispatchMediator::create):
3677 (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3678 (WebCore::FocusEventDispatchMediator::dispatchEvent):
3679 (WebCore::BlurEventDispatchMediator::create):
3680 (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3681 (WebCore::BlurEventDispatchMediator::dispatchEvent):
3682 (WebCore::FocusInEventDispatchMediator::create):
3683 (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3684 (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3685 (WebCore::FocusOutEventDispatchMediator::create):
3686 (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3687 (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3689 (FocusEventDispatchMediator):
3690 (BlurEventDispatchMediator):
3691 (FocusInEventDispatchMediator):
3692 (FocusOutEventDispatchMediator):
3694 (WebCore::Node::dispatchFocusInEvent):
3695 (WebCore::Node::dispatchFocusOutEvent):
3696 (WebCore::Node::dispatchFocusEvent):
3697 (WebCore::Node::dispatchBlurEvent):
3699 2013-02-12 Takashi Sakamoto <tasak@google.com>
3701 [Refactoring] Make SelectorChecker::mode a constructor parameter.
3702 https://bugs.webkit.org/show_bug.cgi?id=109653
3704 Reviewed by Dimitri Glazkov.
3706 No new tests, because just refactoring.
3708 * css/SelectorChecker.cpp:
3709 (WebCore::SelectorChecker::SelectorChecker):
3710 Made mode a constructor parameter.
3711 * css/SelectorChecker.h:
3714 * css/StyleResolver.cpp:
3715 (WebCore::StyleResolver::ruleMatches):
3716 (WebCore::StyleResolver::checkRegionSelector):
3717 * dom/SelectorQuery.cpp:
3718 (WebCore::SelectorQuery::matches):
3719 (WebCore::SelectorQuery::queryAll):
3720 (WebCore::SelectorQuery::queryFirst):
3721 * html/shadow/ContentSelectorQuery.cpp:
3722 (WebCore::ContentSelectorChecker::ContentSelectorChecker):
3724 2013-02-12 Andreas Kling <akling@apple.com>
3726 Remove Element::ensureAttributeData().
3727 <http://webkit.org/b/109643>
3729 Reviewed by Anders Carlsson.
3733 (WebCore::Element::classAttributeChanged):
3734 (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
3736 Use attributeData() instead of ensureAttributeData(), it's already guaranteed to exist in
3737 both these functions as they are called in response to attribute changes.
3740 (WebCore::SVGElement::invalidateSVGAttributes):
3742 Use mutableAttributeData() instead of ensureAttributeData() when invalidating animated
3743 SVG attributes. While I can't find any bugs caused by this, an element with property animations
3744 shouldn't share attribute data with other elements.
3746 2013-02-12 Hayato Ito <hayato@chromium.org>
3748 Make {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
3749 https://bugs.webkit.org/show_bug.cgi?id=109561
3751 Reviewed by Dimitri Glazkov.
3753 Use FocusEvent rather than Event in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
3755 No new tests. No change in functionality.
3757 * dom/FocusEvent.cpp:
3758 (WebCore::FocusEventDispatchMediator::create):
3759 (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3760 (WebCore::BlurEventDispatchMediator::create):
3761 (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3762 (WebCore::FocusInEventDispatchMediator::create):
3763 (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3764 (WebCore::FocusOutEventDispatchMediator::create):
3765 (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3767 (FocusEventDispatchMediator):
3768 (WebCore::FocusEventDispatchMediator::event):
3769 (BlurEventDispatchMediator):
3770 (WebCore::BlurEventDispatchMediator::event):
3771 (FocusInEventDispatchMediator):
3772 (WebCore::FocusInEventDispatchMediator::event):
3773 (FocusOutEventDispatchMediator):
3774 (WebCore::FocusOutEventDispatchMediator::event):
3776 2013-02-12 Eric Seidel <eric@webkit.org>
3778 Fix HTMLToken::Attribute member naming and update callsites to use Vector-based String functions
3779 https://bugs.webkit.org/show_bug.cgi?id=109638
3781 Reviewed by Adam Barth.
3783 Darin Adler noted in:
3784 https://bugs.webkit.org/show_bug.cgi?id=109408#c4
3785 that HTMLToken::Attribute (then MarkupTokenBase::Attribute)
3786 was a struct, yet incorrectly used m_ for its public members.
3788 This patch fixes the members to not have the m_, and since I was
3789 touching all callers, I also updated all callers to use modern
3790 Vector-based String creation/append functions instead of manually
3791 calling UChar*, size_t versions.
3793 There should be no behavior change to this patch. Where I saw
3794 performance/memory bugs, I noted them with FIXMEs to keep
3797 * html/HTMLViewSourceDocument.cpp:
3798 (WebCore::HTMLViewSourceDocument::processTagToken):
3799 * html/parser/AtomicHTMLToken.h:
3800 (WebCore::AtomicHTMLToken::publicIdentifier):
3801 (WebCore::AtomicHTMLToken::systemIdentifier):
3802 (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3803 (WebCore::AtomicHTMLToken::initializeAttributes):
3804 * html/parser/CompactHTMLToken.cpp:
3805 (WebCore::CompactHTMLToken::CompactHTMLToken):
3806 * html/parser/HTMLMetaCharsetParser.cpp:
3807 (WebCore::HTMLMetaCharsetParser::processMeta):
3808 (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
3809 * html/parser/HTMLPreloadScanner.cpp:
3810 (WebCore::StartTagScanner::processAttributes):
3811 (WebCore::HTMLPreloadScanner::scan):
3812 (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3813 (WebCore::HTMLPreloadScanner::processToken):
3814 * html/parser/HTMLToken.h:
3817 (WebCore::HTMLToken::clear):
3818 (WebCore::HTMLToken::startIndex):
3819 (WebCore::HTMLToken::endIndex):
3820 (WebCore::HTMLToken::end):
3821 (WebCore::HTMLToken::nameString):
3822 (WebCore::HTMLToken::addNewAttribute):
3823 (WebCore::HTMLToken::beginAttributeName):
3824 (WebCore::HTMLToken::endAttributeName):
3825 (WebCore::HTMLToken::beginAttributeValue):
3826 (WebCore::HTMLToken::endAttributeValue):
3827 (WebCore::HTMLToken::appendToAttributeName):
3828 (WebCore::HTMLToken::appendToAttributeValue):
3829 (WebCore::HTMLToken::eraseValueOfAttribute):
3830 * html/parser/HTMLTokenizer.cpp:
3831 (WebCore::AtomicHTMLToken::nameForAttribute):
3832 * html/parser/HTMLViewSourceParser.cpp:
3833 (WebCore::HTMLViewSourceParser::updateTokenizerState):
3834 * html/parser/XSSAuditor.cpp:
3835 (WebCore::findAttributeWithName):
3836 (WebCore::XSSAuditor::filterParamToken):
3837 (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3838 (WebCore::XSSAuditor::eraseAttributeIfInjected):
3839 (WebCore::XSSAuditor::decodedSnippetForAttribute):
3841 2013-02-12 Ryosuke Niwa <rniwa@webkit.org>
3846 (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
3848 2013-02-12 Nate Chapin <japhet@chromium.org>
3850 REGRESSION: Reloading a local file doesn't pick up changes
3851 https://bugs.webkit.org/show_bug.cgi?id=109344
3853 Reviewed by Alexey Proskuryakov.
3855 Test: http/tests/cache/reload-main-resource.php
3857 * loader/cache/CachedResource.cpp:
3858 (WebCore::CachedResource::load):
3859 * loader/cache/CachedResourceLoader.cpp:
3860 (WebCore::CachedResourceLoader::determineRevalidationPolicy):
3861 (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
3863 * loader/cache/CachedResourceLoader.h:
3864 (CachedResourceLoader):
3866 2013-02-12 Ryosuke Niwa <rniwa@webkit.org>
3868 Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
3869 https://bugs.webkit.org/show_bug.cgi?id=109549
3871 Reviewed by Tony Chang.
3873 Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
3874 implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).
3876 * editing/DeleteButtonController.cpp:
3877 * editing/EditCommand.cpp:
3878 (WebCore::EditCommand::EditCommand):
3879 * editing/Editor.cpp:
3880 (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
3881 The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
3882 mode code with that function.
3883 (WebCore::Editor::rangeForPoint):
3885 (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
3886 * editing/htmlediting.cpp:
3887 * editing/htmlediting.h:
3888 * editing/markup.cpp:
3889 (WebCore::createMarkupInternal): Extracted from createMarkup.
3890 (WebCore::createMarkup):
3892 2013-02-12 Joseph Pecoraro <pecoraro@apple.com>
3894 [iOS] Enable PAGE_VISIBILITY_API
3895 https://bugs.webkit.org/show_bug.cgi?id=109399
3897 Reviewed by David Kilzer.
3899 * Configurations/FeatureDefines.xcconfig:
3901 2013-02-12 Andreas Kling <akling@apple.com>
3903 Move ElementAttributeData into Element.cpp/h
3904 <http://webkit.org/b/109610>
3906 Reviewed by Anders Carlsson.
3908 Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
3909 In the near future, Element should be the only client of this class, and thus it won't
3910 be necessary for other classes to know anything about it.
3912 * dom/ElementAttributeData.cpp: Removed.
3913 * dom/ElementAttributeData.h: Removed.
3915 * GNUmakefile.list.am:
3918 * WebCore.xcodeproj/project.pbxproj:
3919 * dom/DOMAllInOne.cpp:
3920 * dom/DocumentSharedObjectPool.cpp:
3923 * workers/SharedWorker.cpp:
3924 * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
3926 2013-02-12 Simon Fraser <simon.fraser@apple.com>
3928 Crash when scrolling soon after page starts loading
3929 https://bugs.webkit.org/show_bug.cgi?id=109631
3930 <rdar://problem/13157533&13159627&13196727>
3932 Reviewed by Anders Carlsson.
3934 Make the scrolling tree more robust when the root state node,
3935 and/or scrolling node are null. This can happen if we try to
3936 handle a wheel event before we've done the first scrolling
3939 * page/scrolling/ScrollingStateTree.cpp:
3940 (WebCore::ScrollingStateTree::commit): Handle the case where
3941 m_rootStateNode is null. We'll still commit, but the state tree
3942 will have no state nodes.
3943 * page/scrolling/ScrollingTree.cpp:
3944 (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
3945 (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
3946 (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
3947 is null, just clear the map and null out the root scrolling node.
3948 * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
3949 * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3950 (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
3951 to get here before we've registered the root scroll layer, in which case scrollLayerID()
3952 will be 0. Assert to see if this can ever happen.
3953 (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
3956 2013-02-12 Raymond Toy <rtoy@google.com>
3958 Synchronize setting of panner node model and processing
3959 https://bugs.webkit.org/show_bug.cgi?id=109599
3961 Reviewed by Chris Rogers.
3965 * Modules/webaudio/PannerNode.cpp:
3966 (WebCore::PannerNode::process):
3967 (WebCore::PannerNode::setPanningModel):
3968 * Modules/webaudio/PannerNode.h:
3970 2013-02-12 Dean Jackson <dino@apple.com>
3972 Add class name for snapshotted plugin based on dimensions
3973 https://bugs.webkit.org/show_bug.cgi?id=108369
3975 Reviewed by Simon Fraser.
3977 As the size of the plugin changes, the Shadow Root for the snapshot
3978 might want to toggle different interfaces. Expose "tiny", "small",
3979 "medium" and "large" classes on the Shadow. (The dimensions are
3980 currently chosen fairly arbitrarily).
3982 Because we only know the dimensions after layout, we set up
3983 a post layout task to add the class. Luckily there already was
3984 a post layout task for plugins - I just updated it to handle
3985 both real and snapshotted plugins. This involved modifying
3986 the list of RenderEmbeddedObjects in FrameView to take generic
3987 RenderObjects, and decide which type they are when calling
3990 * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
3991 (WebCore::classNameForShadowRootSize): New static function that returns a class name
3992 after examining the size of the object.
3993 (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
3994 the shadow root. This is called in the post layout task.
3995 (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
3996 (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
3997 * html/HTMLPlugInImageElement.h:
3998 (HTMLPlugInImageElement): New method updateSnapshotInfo.
4000 * page/FrameView.cpp:
4001 (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
4002 (WebCore::FrameView::removeWidgetToUpdate): Ditto
4003 (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
4004 plugin snapshot update if necessary.
4005 (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
4006 * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
4008 * rendering/RenderSnapshottedPlugIn.cpp: