1 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
3 Iterating backwards over HTMLCollection is O(n^2)
4 https://bugs.webkit.org/show_bug.cgi?id=91306
6 Reviewed by Anders Carlsson.
8 Fixed the bug by introducing itemBefore that iterates nodes backwards to complement itemAfter.
9 Unfortunately, some HTML collections such as HTMLFormCollection and HTMLTableRowsCollection have
10 its own itemAfter function and writing an equivalent itemBefore is somewhat tricky. For now,
11 added a new boolean flag indicating whether a given HTML collection supports itemBefore or not,
12 and left those HTML collections that override itemAfter alone.
14 This also paves our way to share more code between DynamicNodeList and HTMLCollection.
16 Test: perf/htmlcollection-backwards-iteration.html
18 * dom/DynamicNodeList.h:
19 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Takes ItemBeforeSupportType.
20 (WebCore::DynamicNodeListCacheBase::supportsItemBefore): Added.
21 (DynamicNodeListCacheBase):
22 (WebCore::DynamicNodeListCacheBase::setItemCache): Replaced a FIXME by an assertion now that
24 * html/HTMLAllCollection.cpp:
25 (WebCore::HTMLAllCollection::HTMLAllCollection): Supports itemBefore since it doesn't override
27 * html/HTMLCollection.cpp:
28 (WebCore::HTMLCollection::HTMLCollection):
29 (WebCore::HTMLCollection::create):
30 (WebCore::isAcceptableElement): Made it a static local function instead of a static member.
31 (WebCore::nextNode): Templatized.
32 (WebCore::itemBeforeOrAfter): Extracted from itemAfter and templatized.
33 (WebCore::HTMLCollection::itemBefore): Added.
34 (WebCore::HTMLCollection::itemAfter):
35 (WebCore::HTMLCollection::shouldSearchFromFirstItem): Added. Determines whether we should reset
36 the item cache to the first item. We obviously do if the cache is invalid. If the target offset
37 is after the cached offset, then we shouldn't go back regardless of availability of itemBefore.
38 Otherwise, we go back to the first item iff itemBefore is not available or the distance from
39 the cached offset to the target offset is greater than the target offset itself.
40 (WebCore::HTMLCollection::length):
41 (WebCore::HTMLCollection::item): Use the term "offset" to match the terminology elsewhere.
42 (WebCore::HTMLCollection::itemBeforeOrAfterCachedItem): Ditto. Also added the logic to iterate
43 nodes backwards using itemBefore. Once we're in this branch, we should always find a matching
44 item since the target offset was less than the cached offset, and offsets are non-negative.
45 If we had ever reached the end of the loop without finding an item, it indicates that the cache
46 has been invalid and we have some serious bug elsewhere.
47 * html/HTMLCollection.h:
48 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
50 * html/HTMLOptionsCollection.cpp:
51 (WebCore::HTMLOptionsCollection::HTMLOptionsCollection): Supports itemBefore since it doesn't
53 * html/HTMLFormCollection.cpp:
54 (WebCore::HTMLFormCollection::HTMLFormCollection): Doesn't support itemBefore as it overrides
56 * html/HTMLNameCollection.cpp:
57 (WebCore::HTMLNameCollection::HTMLNameCollection): Ditto.
58 * html/HTMLPropertiesCollection.cpp:
59 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
60 * html/HTMLTableRowsCollection.cpp:
61 (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
63 2012-07-13 Eric Penner <epenner@google.com>
65 [chromium] Add 'self-managed' option to CCPrioritizedTexture to enable render-surface and canvas use cases.
66 https://bugs.webkit.org/show_bug.cgi?id=91177
68 Reviewed by Adrienne Walker.
70 This makes the render-surface memory use case generic as 'self-managed' textures,
71 as this use case is popping up in other places (eg. canvases). It's exactly the
72 same idea except we can have as many place-holders as we want at arbitrary
75 This already tested by the render surface unit tests which now also use the
78 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
79 (WebCore::CCLayerTreeHost::CCLayerTreeHost):
80 (WebCore::CCLayerTreeHost::initializeLayerRenderer):
81 (WebCore::CCLayerTreeHost::updateLayers):
82 (WebCore::CCLayerTreeHost::setPrioritiesForSurfaces):
84 (WebCore::CCLayerTreeHost::setPrioritiesForLayers):
85 (WebCore::CCLayerTreeHost::prioritizeTextures):
86 (WebCore::CCLayerTreeHost::calculateMemoryForRenderSurfaces):
87 (WebCore::CCLayerTreeHost::paintLayerContents):
88 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
90 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
91 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
92 (WebCore::CCPrioritizedTexture::setToSelfManagedMemoryPlaceholder):
93 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
94 (CCPrioritizedTexture):
95 (WebCore::CCPrioritizedTexture::setIsSelfManaged):
96 (WebCore::CCPrioritizedTexture::isSelfManaged):
97 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
98 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
99 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
100 (WebCore::CCPrioritizedTextureManager::destroyBacking):
101 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
102 (CCPrioritizedTextureManager):
103 (WebCore::CCPrioritizedTextureManager::memoryForSelfManagedTextures):
105 2012-07-13 Kent Tamura <tkent@chromium.org>
107 Internals: Clean up the mock PagePopupDriver correctly.
108 https://bugs.webkit.org/show_bug.cgi?id=91250
110 Unreviewed, a trivial testing code fix.
112 * testing/InternalSettings.cpp:
113 (WebCore::InternalSettings::Backup::restoreTo):
114 (WebCore::InternalSettings::reset):
115 Resetting PaePopupDriver here instead of Backup::restoreTo.
116 Also, close the mock popup before resetting PagePopupDriver by clearing m_pagePopupDriver.
117 * testing/MockPagePopupDriver.cpp:
118 (WebCore::MockPagePopupDriver::~MockPagePopupDriver):
121 2012-07-13 Tony Payne <tpayne@chromium.org>
123 Remove Widget from screenColorProfile
124 https://bugs.webkit.org/show_bug.cgi?id=91300
126 Reviewed by Adam Barth.
128 Chromium, the only platform implementing screenColorProfile, does not
129 need the Widget, so removing for simplicity.
131 Covered by existing tests.
133 * platform/PlatformScreen.h:
134 (WebCore): Updated comment to remove reference to type param that no
135 longer exists and removed Widget param.
136 * platform/blackberry/PlatformScreenBlackBerry.cpp:
137 (WebCore::screenColorProfile): Removed widget param.
138 * platform/chromium/PlatformScreenChromium.cpp:
139 (WebCore::screenColorProfile): Removed widget param.
140 * platform/efl/PlatformScreenEfl.cpp:
141 (WebCore::screenColorProfile): Removed widget param.
142 * platform/gtk/PlatformScreenGtk.cpp:
143 (WebCore::screenColorProfile): Removed widget param.
144 * platform/image-decoders/ImageDecoder.h:
145 (WebCore::ImageDecoder::qcmsOutputDeviceProfile): removed param to
146 match screenColorProfile()'s new spec.
147 * platform/mac/PlatformScreenMac.mm:
148 (WebCore::screenColorProfile): Removed widget param.
149 * platform/qt/PlatformScreenQt.cpp:
150 (WebCore::screenColorProfile): Removed widget param.
151 * platform/win/PlatformScreenWin.cpp:
152 (WebCore::screenColorProfile): Removed widget param.
154 2012-07-13 Brian Anderson <brianderson@chromium.org>
156 [chromium] Add flushes to CCTextureUpdater::update
157 https://bugs.webkit.org/show_bug.cgi?id=89035
159 Reviewed by Adrienne Walker.
161 Automatic flushes are being removed from the command buffer, so
162 this moves the flushes into the CCTextureUpdater itself.
164 CCTextureUpdaterTest added to verify texture upload/flushing patterns.
166 * platform/graphics/chromium/cc/CCGraphicsContext.h:
167 (WebCore::CCGraphicsContext::flush):
169 * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
171 (WebCore::CCTextureUpdater::update): Manual flushes added here.
173 2012-07-13 Kiran Muppala <cmuppala@apple.com>
175 REGRESSION: RenderInline boundingBox ignores relative position offset
176 https://bugs.webkit.org/show_bug.cgi?id=91168
178 Reviewed by Simon Fraser.
180 RenderGeometryMap, used for caching the transform to the view,
181 expects the first mapping pushed, to be that of the view itself.
182 RenderInline was instead pushing it's own offset first. Besides
183 the offset of the view itself was not being pushed.
185 Relaxed the RenderGeometryMap restriction that the first pushed
186 step should be of the view. It is sufficient that the view's mapping
187 is pushed in the first call to pushMappingsToAncestor. Modified
188 RenderInline to push the offset of the view also to the geometry map.
190 Test: fast/inline/inline-relative-offset-boundingbox.html
192 * rendering/RenderGeometryMap.cpp:
193 (WebCore::RenderGeometryMap::pushMappingsToAncestor): Add assertion to
194 check if mapping to view was pushed in first invocation.
195 (WebCore::RenderGeometryMap::pushView): Correct assertion that checks
196 if the view's mapping is the first one to be applied.
197 (WebCore::RenderGeometryMap::stepInserted): Use isRenderView to check if
198 a mapping step belongs to a view instead of using mapping size.
199 (WebCore::RenderGeometryMap::stepRemoved): Ditto.
200 * rendering/RenderInline.cpp:
201 (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
202 Push mappings all the way up to and including the view.
204 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org>
206 Move WebCore/platform/text/Base64 to WTF/wtf/text
207 https://bugs.webkit.org/show_bug.cgi?id=91162
209 Reviewed by Adam Barth.
211 No new tests. Files moving only.
214 * GNUmakefile.list.am:
215 * Modules/websockets/WebSocketHandshake.cpp:
216 (WebCore::generateSecWebSocketKey):
217 (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
221 * WebCore.vcproj/WebCore.vcproj:
222 * WebCore.xcodeproj/project.pbxproj:
223 * fileapi/FileReaderLoader.cpp:
224 (WebCore::FileReaderLoader::convertToDataURL):
225 * inspector/DOMPatchSupport.cpp:
226 (WebCore::DOMPatchSupport::createDigest):
227 * inspector/InspectorFileSystemAgent.cpp:
229 * inspector/InspectorPageAgent.cpp:
230 (WebCore::InspectorPageAgent::cachedResourceContent):
231 (WebCore::InspectorPageAgent::sharedBufferContent):
232 * loader/archive/mhtml/MHTMLArchive.cpp:
233 (WebCore::MHTMLArchive::generateMHTMLData):
234 * loader/archive/mhtml/MHTMLParser.cpp:
235 (WebCore::MHTMLParser::parseNextPart):
236 * page/DOMWindow.cpp:
237 (WebCore::DOMWindow::btoa):
238 (WebCore::DOMWindow::atob):
240 (WebCore::Page::userStyleSheetLocationChanged):
241 * platform/graphics/cairo/ImageBufferCairo.cpp:
242 (WebCore::ImageBuffer::toDataURL):
243 * platform/graphics/cg/ImageBufferCG.cpp:
244 (WebCore::CGImageToDataURL):
245 * platform/graphics/gtk/ImageBufferGtk.cpp:
246 (WebCore::ImageBuffer::toDataURL):
247 * platform/graphics/skia/FontCustomPlatformData.cpp:
248 (WebCore::createUniqueFontName):
249 * platform/graphics/skia/ImageBufferSkia.cpp:
250 (WebCore::ImageBuffer::toDataURL):
251 (WebCore::ImageDataToDataURL):
252 * platform/graphics/win/FontCustomPlatformData.cpp:
253 (WebCore::createUniqueFontName):
254 * platform/graphics/wince/FontCustomPlatformData.cpp:
255 (WebCore::createUniqueFontName):
256 * platform/graphics/wince/ImageBufferWinCE.cpp:
257 * platform/graphics/wx/ImageBufferWx.cpp:
258 * platform/network/DataURL.cpp:
259 (WebCore::handleDataURL):
260 * platform/network/cf/ResourceHandleCFNet.cpp:
261 (WebCore::applyBasicAuthorizationHeader):
262 * platform/network/mac/ResourceHandleMac.mm:
263 (WebCore::applyBasicAuthorizationHeader):
264 * platform/network/soup/ResourceHandleSoup.cpp:
265 * platform/win/SSLKeyGeneratorWin.cpp:
266 (WebCore::WebCore::signedPublicKeyAndChallengeString):
268 2012-07-13 Xianzhu Wang <wangxianzhu@chromium.org>
270 [Chromium] Sometimes bottom of text is truncated when page has a fractional scale
271 https://bugs.webkit.org/show_bug.cgi?id=88684
273 Reviewed by Tony Chang.
275 When the page has a fractional scale, the ascent and descent part of the fonts might be fractional.
276 If the descent part is rounded down, the bottom of the text might be truncated when displayed
277 when subpixel text positioning is enabled.
278 To avoid that, borrow one unit from the ascent when possible.
280 Test: fast/text/descent-clip-in-scaled-page.html
282 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
283 (WebCore::FontPlatformData::setupPaint): Moved NoPreference handling into querySystemForRenderStyle so that fontRenderStyle() can have actual styles without NoPreference.
284 (WebCore::FontPlatformData::querySystemForRenderStyle): Added NoPreference handling (moved from setupPaint)
285 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
287 (WebCore::FontPlatformData::fontRenderStyle): Added to let SimpleFontDataSkia access the font render styles.
288 * platform/graphics/skia/SimpleFontDataSkia.cpp:
289 (WebCore::SimpleFontData::platformInit):
291 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
293 Remove an assertion after r122637.
295 * dom/DynamicNodeList.h:
296 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange):
298 2012-07-13 Pierre Rossi <pierre.rossi@gmail.com>
300 [Qt] Improve the mobile theme slightly
301 https://bugs.webkit.org/show_bug.cgi?id=90806
303 Reviewed by Kenneth Rohde Christiansen.
305 Improve drawing of the mobile theme's controls' background.
307 Ensure the focus ring never appears with the mobile theme, since it
308 looks bad in combination with the highlights.
310 No new tests. The painting code from the mobile theme is still
311 not covered specifically (it will when we revive pixel tests).
313 * platform/qt/RenderThemeQtMobile.cpp:
315 (WebCore::addPointToOctants): Added. This is simply a helper to avoid
316 doing too much duplicate work in drawControlBackground.
317 (WebCore::drawControlBackground): Rely on the octant logic added above
318 and take the opportunity to increase the granularity.
319 (WebCore::borderPen):
320 (WebCore::StylePainterMobile::findLineEdit):
321 (WebCore::RenderThemeQtMobile::adjustTextFieldStyle):
322 * platform/qt/RenderThemeQtMobile.h:
323 (RenderThemeQtMobile):
324 (WebCore::RenderThemeQtMobile::supportsFocusRing):
326 2012-07-13 Julien Chaffraix <jchaffraix@webkit.org>
328 Remove an always-failing table-wrapping check in RenderObject::addChild
329 https://bugs.webkit.org/show_bug.cgi?id=91286
331 Reviewed by Eric Seidel.
333 Due to the structure of the code, this test is always failing (newChild->isTableCell()
334 is true to get in the branch).
336 The changeset adding the code didn't add testing so I poundered adding the mentioned test,
337 which is passing. However the test would need to be blindly changed to be included in our
338 test harness. I would also expect this code to be exercised by other table tests anyway.
340 * rendering/RenderObject.cpp:
341 (WebCore::RenderObject::addChild):
342 Removed never-reached branch. While at it, removed a 'what' comment in the same file.
344 2012-07-13 Emil A Eklund <eae@chromium.org>
346 Use LayoutBoxExtent for image outsets
347 https://bugs.webkit.org/show_bug.cgi?id=91166
349 Reviewed by Tony Chang.
351 Change RenderStyle and calling code to use LayoutBoxExtent for image
352 outsets and remove text direction and writing mode versions of the
353 outline getters from RenderStyle as LayoutBoxExtent provides the same
356 No new tests, no change in functionality.
358 * platform/graphics/FractionalLayoutBoxExtent.h:
359 * platform/graphics/FractionalLayoutBoxExtent.cpp:
360 (WebCore::FractionalLayoutBoxExtent::logicalTop):
361 (WebCore::FractionalLayoutBoxExtent::logicalBottom):
362 Add logicalTop and logicalBottom methods to go with the existing
363 logicalLeft and logicalRight ones.
365 * platform/graphics/FractionalLayoutRect.h:
366 (WebCore::FractionalLayoutRect::expand):
367 Add FractionalLayoutBoxExtent version of expand method.
369 * rendering/InlineFlowBox.cpp:
370 (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
371 Change implementation to use the new FractionalLayoutBoxExtent version of
372 borderImageOutsets and the logicalTop/Bottom/Left/Right methods.
374 (WebCore::clipRectForNinePieceImageStrip):
375 Change implementation to use the new FractionalLayoutBoxExtent version of
378 * rendering/RenderBox.cpp:
379 (WebCore::RenderBox::maskClipRect):
380 Change implementation to use the new FractionalLayoutBoxExtent version of
381 borderImageOutsets and the new FractionalLayoutRect::expand method.
383 (WebCore::RenderBox::addVisualEffectOverflow):
384 Change implementation to use the new FractionalLayoutBoxExtent version of
387 * rendering/RenderBoxModelObject.cpp:
388 (WebCore::RenderBoxModelObject::paintNinePieceImage):
389 Change implementation to use the new FractionalLayoutBoxExtent version of
390 borderImageOutsets and the new FractionalLayoutRect::expand method.
392 * rendering/style/RenderStyle.h:
393 * rendering/style/RenderStyle.cpp:
394 (WebCore::RenderStyle::imageOutsets):
395 Change getImageOutsets to return a FractionalLayoutBoxExtent object and
396 rename to imageOutsets to match the webkit naming convention for getters.
398 Remove getBorderImageHorizontalOutsets, getBorderImageVerticalOutsets,
399 getBorderImageInlineDirectionOutsets, getImageHorizontalOutsets,
400 getImageVerticalOutsets and getBorderImageBlockDirectionOutsets methods
401 as the same functionality is provided by FractionalLayoutBoxExtent.
403 2012-07-13 David Hyatt <hyatt@apple.com>
405 https://bugs.webkit.org/show_bug.cgi?id=91278
406 Improve block margin estimation function to account for not having a layout and for quirks mode
408 Reviewed by Simon Fraser.
410 * rendering/RenderBlock.cpp:
411 (WebCore::RenderBlock::marginBeforeEstimateForChild):
412 Revise marginBeforeEstimateForChild so that it computes block margins for the grandchild before
413 recurring. This includes the quirks margin information as well. This ensures that the margins are
414 up-to-date when checked, even before the object has had its first layout.
416 * rendering/RenderBlock.h:
417 (WebCore::RenderBlock::setMarginStartForChild):
418 (WebCore::RenderBlock::setMarginEndForChild):
419 (WebCore::RenderBlock::setMarginBeforeForChild):
420 (WebCore::RenderBlock::setMarginAfterForChild):
421 * rendering/RenderBox.cpp:
422 (WebCore::RenderBox::computeBlockDirectionMargins):
423 * rendering/RenderBox.h:
425 Add consts in order to compile.
427 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
429 NodeLists should not invalidate on irreleavnt attribute changes
430 https://bugs.webkit.org/show_bug.cgi?id=91277
432 Reviewed by Ojan Vafai.
434 Explicitely check the invalidation type and the changed attribute in NodeListNodeData::invalidateCaches
435 and ElementRareData::clearHTMLCollectionCaches to only invalidate node lists affected by the change.
437 Also merged invalidateNodeListsCacheAfterAttributeChanged and invalidateNodeListsCacheAfterChildrenChanged
438 as invalidateNodeListCachesInAncestors since they're almost identical after r122498.
440 In addition, moved shouldInvalidateNodeListForType from Document.cpp to DynamicNodeList.h and renamed it to
441 shouldInvalidateTypeOnAttributeChange since it needs to called in Node.cpp and ElementRareData.h.
444 (WebCore::Attr::setValue):
445 (WebCore::Attr::childrenChanged):
446 * dom/ContainerNode.cpp:
447 (WebCore::ContainerNode::childrenChanged):
449 (WebCore::Document::registerNodeListCache): Calls isRootedAtDocument() instead of directly comparing
450 the value of NodeListRootType in order to prepare for the bug 80269.
451 (WebCore::Document::unregisterNodeListCache): Ditto.
452 (WebCore): shouldInvalidateNodeListForType is moved to DynamicNodeList.h
453 (WebCore::Document::shouldInvalidateNodeListCaches):
454 * dom/DynamicNodeList.h:
455 (DynamicNodeListCacheBase):
456 (WebCore::DynamicNodeListCacheBase::shouldInvalidateTypeOnAttributeChange): Moved from Document.cpp.
458 (WebCore::Element::attributeChanged):
459 * dom/ElementRareData.h:
460 (WebCore::ElementRareData::clearHTMLCollectionCaches): Takes const QualifiedName* to compare against
461 the invalidation type of HTML collections via shouldInvalidateTypeOnAttributeChange.
463 (WebCore::Node::invalidateNodeListCachesInAncestors): Merged invalidateNodeListCachesInAncestors and
464 invalidateNodeListsCacheAfterChildrenChanged. Also pass attrName to clearHTMLCollectionCaches.
465 (WebCore::NodeListsNodeData::invalidateCaches): Compares attrName against the invalidation type of
466 node lists via shouldInvalidateTypeOnAttributeChange.
470 * dom/NodeRareData.h:
471 (WebCore::NodeRareData::ensureNodeLists): Merged NodeRareData::createNodeLists.
472 (WebCore::NodeRareData::clearChildNodeListCache): Moved from Node.cpp.
474 * html/HTMLCollection.h:
475 (HTMLCollectionCacheBase):
477 2012-07-13 Arpita Bahuguna <arpitabahuguna@gmail.com>
479 Refactor RenderTable to use the section's iteration functions.
480 https://bugs.webkit.org/show_bug.cgi?id=89751
482 Reviewed by Julien Chaffraix.
484 Removing anti-pattern wherever possible from RenderTable code. Also, modifying
485 RenderTable sections' iterations to use helper functions.
487 No new tests required for this change since no change in behavior is expected.
489 * rendering/RenderTable.cpp:
490 (WebCore::RenderTable::addOverflowFromChildren):
491 (WebCore::RenderTable::setCellLogicalWidths):
492 (WebCore::RenderTable::outerBorderStart):
493 (WebCore::RenderTable::outerBorderEnd):
494 Removed anti-patterns involving iterations over RenderObjects.
496 (WebCore::RenderTable::outerBorderAfter):
497 Modified RenderTable sections' iteration to use helper functions.
499 2012-07-13 Enrica Casucci <enrica@apple.com>
501 Threadsafety issues in WebScriptObject
502 https://bugs.webkit.org/show_bug.cgi?id=90849
504 Reviewed by Geoff Garen.
506 Updated fix for this bug. The JSC API lock needs to be acquired also in JSObject.
508 * bindings/objc/WebScriptObject.mm:
509 (-[WebScriptObject JSObject]):
511 2012-07-13 Raymond Toy <rtoy@google.com>
513 DelayNode doesn't work if delayTime.value == delayTime.maxValue
514 https://bugs.webkit.org/show_bug.cgi?id=90357
516 Reviewed by Kenneth Russell.
518 Increase delay buffer size slightly so that the read and write
519 pointers don't become equal when the delay and the max delay are
522 Tests: webaudio/delaynode-max-default-delay.html
523 webaudio/delaynode-max-nondefault-delay.html
525 * Modules/webaudio/DelayDSPKernel.cpp:
526 (WebCore): Moved SmoothingTimeConstant to WebCore namespace.
527 (WebCore::DelayDSPKernel::DelayDSPKernel): Add some additional checks to prevent crashes; use bufferLengthForDelay to compute buffer length.
528 (WebCore::DelayDSPKernel::bufferLengthForDelay): New function to compute buffer length.
529 * Modules/webaudio/DelayDSPKernel.h:
530 (DelayDSPKernel): Declare bufferLengthForDelay.
532 2012-07-13 Benjamin Poulain <bpoulain@apple.com>
534 Always aggressively preload on iOS
535 https://bugs.webkit.org/show_bug.cgi?id=91276
537 Reviewed by Simon Fraser.
539 * loader/cache/CachedResourceLoader.cpp:
540 (WebCore::CachedResourceLoader::preload):
542 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
544 Restructure V8Utilities::extractTransferables() with help of toV8Sequence()
545 https://bugs.webkit.org/show_bug.cgi?id=91208
547 Reviewed by Kentaro Hara.
549 We can remove the specialised check for MessagePort from V8Utilities::extractTransferables()
550 using toV8Sequence() as it validates the passed object for sequence type per WebIDL spec.
552 No new test as just refactoring.
553 Existing tests under fast/dom/Window/window-* fast/dom/events/*
556 * bindings/v8/V8Utilities.cpp:
557 (WebCore::extractTransferables):
559 2012-07-13 Vincent Scheib <scheib@chromium.org>
561 Pointer Lock handles disconnected DOM elements
562 https://bugs.webkit.org/show_bug.cgi?id=77029
564 Reviewed by Adrienne Walker.
566 Pointer Lock Controller now checks when elements or documents are
567 removed, and unlocks if the target element is being removed.
569 Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
570 pointer-lock/locked-element-removed-from-dom.html
573 (WebCore::Document::detach):
575 (WebCore::Element::removedFrom):
576 (WebCore::Element::webkitRequestPointerLock):
577 * page/PointerLockController.cpp:
578 (WebCore::PointerLockController::requestPointerLock):
579 (WebCore::PointerLockController::elementRemoved):
581 (WebCore::PointerLockController::documentDetached):
582 (WebCore::PointerLockController::didLosePointerLock):
583 (WebCore::PointerLockController::enqueueEvent):
584 * page/PointerLockController.h:
586 (PointerLockController):
588 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
590 HTMLCollection should use DynamicNodeList's invalidation model
591 https://bugs.webkit.org/show_bug.cgi?id=90326
593 Reviewed by Anders Carlsson.
595 Make HTMLCollection invalidated upon attribute and children changes instead of invalidating it on demand
596 by comparing DOM tree versions. Node that HTMLCollections owned by Document are invalidated with other
597 document-rooted node lists in m_listsInvalidatedAtDocument for simplicity although this mechanism is
598 normally used for node lists owned by a non-Document node that contains nodes outside of its subtree.
599 ItemProperties and FormControls are more "traditional" users of the mechanism.
601 Also, merged DynamicNodeList::invalidateCache and HTMLCollection::invalidateCache.
604 (WebCore::Document::registerNodeListCache): Renamed. No longer takes NodeListInvalidationType or
605 NodeListRootType since they can be obtained from the cache base. Increment the node list counter for
606 InvalidateOnIdNameAttrChange when a HTMLCollection is passed in since all HTMLCollections need to be
607 invalidated on id or name content attribute changes due to named getters.
608 (WebCore::Document::unregisterNodeListCache): Ditto.
609 (WebCore::shouldInvalidateNodeListForType):
610 (WebCore::Document::shouldInvalidateNodeListCaches):
611 (WebCore::Document::clearNodeListCaches):
613 (WebCore): Added InvalidateOnIdNameAttrChange, InvalidateOnHRefAttrChange, and InvalidateOnAnyAttrChange.
615 * dom/DynamicNodeList.cpp:
616 (WebCore::DynamicNodeListCacheBase::invalidateCache): Added. Invalidates caches of both DynamicNodeList
617 and HTMLCollection. We can't afford to use virtual function calls here because this function is called on
618 all node lists and HTML collections owned by ancestors of an element under which a node is added, removed,
619 or its attributes are changed.
621 * dom/DynamicNodeList.h:
622 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase): Initializes member variables directly
623 instead of calling clearCache now that DynamicNodeListCacheBase::invalidateCache has become polymorphic.
624 (DynamicNodeListCacheBase): Increased the number of bits for m_invalidationType since we now have 9
626 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList):
627 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
628 * dom/ElementRareData.h:
630 (WebCore::ElementRareData::clearHTMLCollectionCaches): Added.
631 (WebCore::ElementRareData::adoptTreeScope): Added; similar to NodeRareData::adoptTreeScope.
633 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Clears HTML collection caches as well as
635 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Ditto.
636 * dom/NodeRareData.h:
637 (WebCore::NodeListsNodeData::adoptTreeScope):
638 * dom/TreeScopeAdopter.cpp:
639 (WebCore::TreeScopeAdopter::moveTreeToNewScope): Calls ElementRareData's adoptTreeScope as well as
641 * html/HTMLAllCollection.cpp:
642 (WebCore::HTMLAllCollection::namedItemWithIndex):
643 * html/HTMLCollection.cpp:
644 (WebCore::rootTypeFromCollectionType): Added. As mentioned above, treat all Document-owned HTML collection
645 as if rooted at document for convenience.
646 (WebCore::invalidationTypeExcludingIdAndNameAttributes): Added. Since all HTML collection requires
647 invalidation on id and name content attribute changes, which is taken care by the special logic in
648 Document::registerNodeListCache, exclude those two attributes from consideration.
649 (WebCore::HTMLCollection::HTMLCollection): Calls Document::registerNodeListCache.
650 (WebCore::HTMLCollection::~HTMLCollection): Calls Document::unregisterNodeListCache.
651 (WebCore::HTMLCollection::length):
652 (WebCore::HTMLCollection::item):
653 (WebCore::HTMLCollection::namedItem):
654 (WebCore::HTMLCollection::updateNameCache):
655 * html/HTMLCollection.h:
656 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
657 (HTMLCollectionCacheBase): Removed m_cacheTreeVersion and clearCache since they're no longer used.
659 * html/HTMLFormCollection.cpp:
660 (WebCore::HTMLFormCollection::namedItem):
661 (WebCore::HTMLFormCollection::updateNameCache):
662 * html/HTMLOptionsCollection.h:
663 (HTMLOptionsCollection):
664 * html/HTMLPropertiesCollection.cpp:
665 (WebCore::HTMLPropertiesCollection::updateNameCache):
666 * html/HTMLPropertiesCollection.h:
667 (WebCore::HTMLPropertiesCollection::invalidateCache):
669 2012-07-13 Shawn Singh <shawnsingh@chromium.org>
671 [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp
672 https://bugs.webkit.org/show_bug.cgi?id=91260
674 Reviewed by Adrienne Walker.
676 ASSERT(!clipped) was being triggered after skinny almost-degenerate
677 quads went through anti-aliasing inflation, and then were being
678 transformed back from device space to local space. It turns out
679 this assertion is too aggressive, and we don't yet have an obvious
680 need to change the behavior on the clipped==true case.
682 No new tests needed, this patch fixes only comments and debug code.
684 * platform/graphics/chromium/LayerRendererChromium.cpp:
685 (WebCore::LayerRendererChromium::drawRenderPassQuad):
688 (WebCore::LayerRendererChromium::drawTileQuad):
689 fixed a similar comment, removed unnecessary assertion.
691 2012-07-13 Philip Rogers <pdr@google.com>
693 Remove assert in localCoordinateSpaceTransform()
694 https://bugs.webkit.org/show_bug.cgi?id=91189
696 Reviewed by Nikolas Zimmermann.
698 The assert in localCoordinateSpaceTransform was added to catch subclasses forgetting
699 to override the method but it is better to simply return the identity matrix.
701 This scenario can occur when we break the SVG content model, such as asking for
702 the CTM of a <g> element inside a <tspan>. This is undefined in the spec because
703 tspan is not a subclass of SVGLocatable but both Firefox and Opera
704 implement this by returning the identity matrix.
706 Test: svg/custom/invalid-ctm.svg
708 * svg/SVGStyledElement.cpp:
709 (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
711 2012-07-13 Kentaro Hara <haraken@chromium.org>
713 [V8] String wrappers should be marked Independent
714 https://bugs.webkit.org/show_bug.cgi?id=91251
716 Reviewed by Adam Barth.
718 Currently V8 String wrappers are not marked Independent.
719 By marking them Independent, they can be reclaimed by the scavenger GC.
721 I tried to find some cases where this change reduces memory usage,
722 but couldn't due to sensitive behavior of GC.
724 No tests. No change in behavior.
726 * bindings/v8/V8Binding.cpp:
727 (WebCore::StringCache::v8ExternalStringSlow):
729 2012-07-13 Peter Beverloo <peter@chromium.org>
731 [Chromium] Make the v8 i18n API dependency conditional for Android, disable strict aliasing
732 https://bugs.webkit.org/show_bug.cgi?id=91240
734 Reviewed by Adam Barth.
736 Disable the v8 internationalization API for Chromium Android, as it's
737 disabled and not always available in checkouts. Furthermore, disable
738 strict aliasing for the webkit_remaining target, similar to what
739 x11-based builds are doing (see the webcore_prerequisites target).
741 * WebCore.gyp/WebCore.gyp:
743 2012-07-13 Kentaro Hara <haraken@chromium.org>
745 [CallWith=XXX] arguments should be placed at the head of method arguments
746 https://bugs.webkit.org/show_bug.cgi?id=91217
748 Reviewed by Adam Barth.
750 The EFL build with the ENABLE_FILE_SYSTEM flag caused a build error,
751 because CodeGeneratorJS.pm assumes webkitEntries(ScriptExecutionContext*, HTMLInputElement*)
752 but the actual signature is webkitEntries(HTMLInputElement*, ScriptExecutionContext*) (bug 91185).
754 Per https://trac.webkit.org/wiki/WebKitIDL#CallWith, [CallWith=XXX] arguments should be placed
755 at the head of the arguments. (i.e. the behavior of CodeGeneratorJS.pm is correct.)
757 Thus the correct fix is (1) to change the signature of webkitEntries() and webkitGetAsEntry()
758 so that ScriptExecutionContext* comes first and (2) to modify CodeGeneratorV8.pm to support the order.
760 Test: bindings/scripts/test/TestObj.idl
762 * Modules/filesystem/DataTransferItemFileSystem.h: Placed ScriptExecutionContext* at the head of arguments.
763 (DataTransferItemFileSystem):
764 * Modules/filesystem/HTMLInputElementFileSystem.cpp: Ditto.
765 (WebCore::HTMLInputElementFileSystem::webkitEntries):
766 * Modules/filesystem/HTMLInputElementFileSystem.h: Ditto.
767 (HTMLInputElementFileSystem):
768 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Ditto.
769 (WebCore::DataTransferItemFileSystem::webkitGetAsEntry):
771 * bindings/scripts/CodeGeneratorV8.pm: Modified to support the correct order.
772 (GenerateNormalAttrGetter):
773 (GenerateNormalAttrSetter):
774 (GenerateFunctionCallString):
776 * bindings/scripts/test/V8/V8TestInterface.cpp: Updated run-bindings-tests results.
777 (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
779 2012-07-13 Mary Wu <mary.wu@torchmobile.com.cn>
781 [BlackBerry] Some small changes in network code
782 https://bugs.webkit.org/show_bug.cgi?id=90974
784 Reviewed by Rob Buis.
786 1. Set status in NetworkJob/SocketStreamHandleBlackBerry so that
787 its wrapped stream can also query the stream result.
788 2. pass download attribute to NetworkRequest.
791 Reviewed internally by Lyon Chen and Joe Mason.
793 * platform/network/blackberry/NetworkJob.cpp:
794 (WebCore::NetworkJob::handleNotifyClose):
795 * platform/network/blackberry/NetworkJob.h:
796 (WebCore::NetworkJob::status):
797 * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
798 (WebCore::platformTargetTypeForRequest):
799 * platform/network/blackberry/SocketStreamHandle.h:
800 (WebCore::SocketStreamHandle::status):
801 (SocketStreamHandle):
802 * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
803 (WebCore::SocketStreamHandle::notifyStatusReceived):
804 (WebCore::SocketStreamHandle::notifyClose):
806 2012-07-13 Vsevolod Vlasov <vsevik@chromium.org>
808 Web Inspector: Remove uiSourceCode from Resource.
809 https://bugs.webkit.org/show_bug.cgi?id=91201
811 Reviewed by Pavel Feldman.
813 Removed Resource._uiSourceCode field as it is not used anymore.
815 * inspector/front-end/Resource.js:
816 (WebInspector.Resource.prototype.isHidden):
817 * inspector/front-end/UISourceCode.js:
818 (WebInspector.UISourceCode):
820 2012-07-13 Sheriff Bot <webkit.review.bot@gmail.com>
822 Unreviewed, rolling out r122450 and r122580.
823 http://trac.webkit.org/changeset/122450
824 http://trac.webkit.org/changeset/122580
825 https://bugs.webkit.org/show_bug.cgi?id=91263
827 Caused multiple regressions on ClusterFuzz (Requested by
828 inferno-sec on #webkit).
830 * bindings/js/ScriptWrappable.h:
831 (WebCore::ScriptWrappable::reportMemoryUsage):
832 * bindings/v8/DOMDataStore.cpp:
833 (WebCore::DOMDataStore::reportMemoryUsage):
834 * bindings/v8/IntrusiveDOMWrapperMap.h:
835 (WebCore::ChunkedTable::reportMemoryUsage):
836 * bindings/v8/ScriptWrappable.h:
837 (WebCore::ScriptWrappable::reportMemoryUsage):
838 * bindings/v8/V8Binding.cpp:
839 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
840 (WebCore::StringCache::reportMemoryUsage):
841 * bindings/v8/V8DOMMap.h:
842 * css/PropertySetCSSStyleDeclaration.cpp:
843 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
844 * css/StylePropertySet.cpp:
845 * css/StylePropertySet.h:
846 (WebCore::StylePropertySet::reportMemoryUsage):
847 * dom/CharacterData.cpp:
848 (WebCore::CharacterData::reportMemoryUsage):
849 * dom/ContainerNode.h:
850 (WebCore::ContainerNode::reportMemoryUsage):
852 (WebCore::Document::reportMemoryUsage):
854 (WebCore::Element::detachAttribute):
855 (WebCore::Element::removeAttribute):
856 (WebCore::Element::attributes):
857 (WebCore::Element::setAttributeInternal):
858 (WebCore::Element::parserSetAttributes):
859 (WebCore::Element::hasEquivalentAttributes):
860 (WebCore::Element::createAttributeData):
862 (WebCore::Element::setAttributeNode):
863 (WebCore::Element::removeAttributeNode):
864 (WebCore::Element::getAttributeNode):
865 (WebCore::Element::getAttributeNodeNS):
866 (WebCore::Element::hasAttribute):
867 (WebCore::Element::hasAttributeNS):
868 (WebCore::Element::normalizeAttributes):
869 (WebCore::Element::cloneAttributesFromElement):
871 (WebCore::Element::attributeData):
873 (WebCore::Element::reportMemoryUsage):
874 (WebCore::Element::ensureAttributeData):
875 (WebCore::Element::updatedAttributeData):
876 (WebCore::Element::ensureUpdatedAttributeData):
877 * dom/ElementAttributeData.cpp:
878 (WebCore::ElementAttributeData::attrIfExists):
879 (WebCore::ElementAttributeData::ensureAttr):
880 (WebCore::ElementAttributeData::setAttr):
881 (WebCore::ElementAttributeData::removeAttr):
882 (WebCore::ElementAttributeData::setClass):
884 (WebCore::ElementAttributeData::ensureInlineStyle):
885 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
886 (WebCore::ElementAttributeData::destroyInlineStyle):
887 (WebCore::ElementAttributeData::addAttribute):
888 (WebCore::ElementAttributeData::removeAttribute):
889 (WebCore::ElementAttributeData::isEquivalent):
890 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
891 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
892 (WebCore::ElementAttributeData::cloneDataFrom):
893 (WebCore::ElementAttributeData::clearAttributes):
894 (WebCore::ElementAttributeData::replaceAttribute):
895 (WebCore::ElementAttributeData::getAttributeNode):
896 * dom/ElementAttributeData.h:
897 (WebCore::ElementAttributeData::create):
898 (ElementAttributeData):
899 (WebCore::ElementAttributeData::setIdForStyleResolution):
900 (WebCore::ElementAttributeData::setAttributeStyle):
901 (WebCore::ElementAttributeData::length):
902 (WebCore::ElementAttributeData::isEmpty):
903 (WebCore::ElementAttributeData::attributeItem):
904 (WebCore::ElementAttributeData::getAttributeItem):
905 (WebCore::ElementAttributeData::reportMemoryUsage):
906 (WebCore::ElementAttributeData::ElementAttributeData):
907 (WebCore::ElementAttributeData::attributeVector):
908 (WebCore::ElementAttributeData::clonedAttributeVector):
909 (WebCore::ElementAttributeData::removeAttribute):
910 (WebCore::ElementAttributeData::getAttributeItemIndex):
911 * dom/MemoryInstrumentation.h:
912 (MemoryInstrumentation):
914 (WebCore::MemoryObjectInfo::reportInstrumentedPointer):
915 (WebCore::MemoryObjectInfo::reportPointer):
916 (WebCore::MemoryObjectInfo::reportInstrumentedObject):
917 (WebCore::MemoryObjectInfo::reportObject):
918 (WebCore::MemoryObjectInfo::reportObjectInfo):
919 (WebCore::MemoryObjectInfo::reportHashMap):
920 (WebCore::MemoryObjectInfo::reportHashSet):
921 (WebCore::MemoryObjectInfo::reportListHashSet):
922 (WebCore::MemoryObjectInfo::reportVector):
923 (WebCore::MemoryObjectInfo::reportString):
924 (WebCore::MemoryObjectInfo::objectType):
925 (WebCore::MemoryObjectInfo::objectSize):
926 (WebCore::MemoryObjectInfo::memoryInstrumentation):
928 (WebCore::Node::reportMemoryUsage):
929 * dom/QualifiedName.h:
930 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
931 (WebCore::QualifiedName::reportMemoryUsage):
932 * dom/StyledElement.cpp:
933 (WebCore::StyledElement::style):
934 (WebCore::StyledElement::classAttributeChanged):
935 (WebCore::StyledElement::setInlineStyleProperty):
936 (WebCore::StyledElement::removeInlineStyleProperty):
937 (WebCore::StyledElement::addSubresourceAttributeURLs):
938 * dom/StyledElement.h:
939 (WebCore::StyledElement::ensureInlineStyle):
940 * html/parser/HTMLConstructionSite.cpp:
941 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
942 * platform/TreeShared.h:
943 (WebCore::TreeShared::reportMemoryUsage):
944 * xml/parser/XMLDocumentParserQt.cpp:
945 (WebCore::XMLDocumentParser::XMLDocumentParser):
947 2012-07-13 Huang Dongsung <luxtella@company100.net>
949 Remove down-casting to BitmapImage in GraphicsContext::drawImage.
950 https://bugs.webkit.org/show_bug.cgi?id=90755
952 Reviewed by Simon Fraser.
954 Add a BitmapImage draw method which takes RespectImageOrientationEnum enum as
955 the last argument for CG. Then we can remove the conditional down-casting in
956 GraphicsContext::drawImage.
958 This change is needed for parallel image decoders. Because parallel image
959 decoders use a Bitmap image wrapper class which extends Image (not Bitmap), the
960 down-casting above causes the loss of RespectImageOrientationEnum which must be
961 passed to BitmapImage.
963 No new tests, no behavior change.
965 * platform/graphics/BitmapImage.cpp:
966 * platform/graphics/BitmapImage.h:
967 * platform/graphics/GraphicsContext.cpp:
968 (WebCore::GraphicsContext::drawImage):
969 * platform/graphics/Image.cpp:
970 (WebCore::Image::draw):
972 * platform/graphics/Image.h:
975 2012-07-13 Lauro Neto <lauro.neto@openbossa.org>
977 Fix QtWebKit build with OpenGLES after GC3D/E3D refactor
978 https://bugs.webkit.org/show_bug.cgi?id=91156
980 Reviewed by Noam Rosenthal.
982 Adds several build fixes.
984 * platform/graphics/GraphicsContext3D.h:
985 Use E3DOpenGLES instead of previously removed E3DQt.
987 * platform/graphics/OpenGLESShims.h:
988 Enable defines for Qt.
990 * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
991 (WebCore::Extensions3DOpenGLES::blitFramebuffer):
993 (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisample):
994 (WebCore::Extensions3DOpenGLES::copyTextureCHROMIUM):
995 Added pure virtual stubs.
997 (WebCore::Extensions3DOpenGLES::supportsExtension):
998 Remove PROC suffix. See bug #91130.
1000 * platform/graphics/opengl/Extensions3DOpenGLES.h:
1001 (Extensions3DOpenGLES):
1002 Added pure virtual stubs.
1004 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1005 (WebCore::GraphicsContext3D::reshapeFBOs):
1006 Readded missing function after removed in r122250.
1009 Use PLATFORM(BLACKBERRY) guard around port-specific include.
1011 * platform/graphics/qt/GraphicsContext3DQt.cpp:
1012 Added USE(OPENGL_ES_2) guard instead of always loading the OpenGL extensions.
1015 2012-07-13 Keishi Hattori <keishi@webkit.org>
1017 Form of FormAssociatedElement is not updated when id target changes.
1018 https://bugs.webkit.org/show_bug.cgi?id=91042
1020 Reviewed by Kent Tamura.
1022 Test: fast/forms/update-form-attribute-element.html
1024 This patch introduces the IdTargetObserver and IdTargetObserverRegistry class.
1025 They can be used to be notified when the element that an id is pointing to (the id target)
1028 * CMakeLists.txt: Added IdTargetObserverRegistry.{h,cpp} and IdTargetObserver.{h,cpp}
1029 * GNUmakefile.list.am: Ditto.
1030 * Target.pri: Ditto.
1031 * WebCore.gypi: Ditto.
1032 * WebCore.vcproj/WebCore.vcproj: Ditto.
1033 * WebCore.xcodeproj/project.pbxproj: Ditto.
1034 * dom/DOMAllInOne.cpp:
1035 * dom/IdTargetObserver.cpp: Added. When you want notified of changes to an id target, you should create a new class that inherits this.
1037 (WebCore::IdTargetObserver::IdTargetObserver):
1038 (WebCore::IdTargetObserver::~IdTargetObserver):
1039 * dom/IdTargetObserver.h: Added.
1042 * dom/IdTargetObserverRegistry.cpp: Added.
1044 (WebCore::IdTargetObserverRegistry::create):
1045 (WebCore::IdTargetObserverRegistry::addObserver): Register an IdTargetObserver to observe an id target.
1046 (WebCore::IdTargetObserverRegistry::removeObserver): Unregisters an IdTargetObserver from observing.
1047 (WebCore::IdTargetObserverRegistry::notifyObserversInternal):
1048 * dom/IdTargetObserverRegistry.h: Added.
1050 (IdTargetObserverRegistry):
1051 (WebCore::IdTargetObserverRegistry::IdTargetObserverRegistry):
1052 (WebCore::IdTargetObserverRegistry::notifyObservers): Calls idTargetChanged on all observers for an id. Inlining first part of function for performance.
1053 * dom/TreeScope.cpp:
1054 (WebCore::TreeScope::TreeScope):
1055 (WebCore::TreeScope::addElementById): Calls IdTargetObserverRegistry::notifyObservers because the id target might have changed.
1056 (WebCore::TreeScope::removeElementById): Ditto.
1059 (WebCore::TreeScope::idTargetObserverRegistry):
1061 * html/FormAssociatedElement.cpp: Observer for id targets defined by the form attribute.
1062 (WebCore::FormAssociatedElement::didMoveToNewDocument):
1063 (WebCore::FormAssociatedElement::insertedInto):
1064 (WebCore::FormAssociatedElement::removedFrom):
1065 (WebCore::FormAssociatedElement::formAttributeChanged):
1066 (WebCore::FormAssociatedElement::resetFormAttributeTargetObserver): Creates and sets up a new FormAttributeTargetObserver.
1068 (WebCore::FormAssociatedElement::formAttributeTargetChanged):
1069 (WebCore::FormAttributeTargetObserver::create):
1070 (WebCore::FormAttributeTargetObserver::FormAttributeTargetObserver):
1071 (WebCore::FormAttributeTargetObserver::idTargetChanged):
1072 * html/FormAssociatedElement.h:
1073 (FormAssociatedElement):
1074 * html/FormController.cpp:
1075 * html/FormController.h:
1077 * html/HTMLFormElement.cpp:
1078 (WebCore::HTMLFormElement::removedFrom):
1079 (WebCore::HTMLFormElement::formElementIndexWithFormAttribute): Modified to take a range. It
1080 scans the range and returns the index to insert the element in m_associatedElement.
1081 (WebCore::HTMLFormElement::formElementIndex): Modified to only scan the elements in
1082 m_associatedElement that precede and follow the form element.
1083 * html/HTMLFormElement.h:
1086 2012-07-13 Gabor Rapcsanyi <rgabor@webkit.org>
1088 Optimizing blend filter to ARM-NEON with intrinsics
1089 https://bugs.webkit.org/show_bug.cgi?id=90949
1091 Reviewed by Zoltan Herczeg.
1093 The feBlend SVG filter modes can be greatly fasten up with ARM-NEON since
1094 we are able to calculate with 2 pixels (8 channels) at the same time.
1095 The code is written with NEON intrinsics and it doesn't affect the
1096 general - it has the same behaviour as the original algorithm.
1097 With this NEON optimization the calculation is ~4.5 times faster for each mode.
1099 Existing tests cover this issue.
1102 * GNUmakefile.list.am:
1105 * WebCore.vcproj/WebCore.vcproj:
1106 * WebCore.xcodeproj/project.pbxproj:
1107 * platform/graphics/filters/FEBlend.cpp:
1108 (WebCore::FEBlend::platformApplyGeneric):
1110 (WebCore::FEBlend::platformApplySoftware):
1111 * platform/graphics/filters/FEBlend.h:
1113 * platform/graphics/filters/arm/FEBlendNEON.h: Added.
1115 (FEBlendUtilitiesNEON):
1116 (WebCore::FEBlendUtilitiesNEON::div255): integer divison with 255
1117 (WebCore::FEBlendUtilitiesNEON::normal): calculate normal mode blending for two pixels
1118 (WebCore::FEBlendUtilitiesNEON::multiply): calculate multiply mode blending for two pixels
1119 (WebCore::FEBlendUtilitiesNEON::screen): calculate screen mode blending for two pixels
1120 (WebCore::FEBlendUtilitiesNEON::darken): calculate darken mode blending for two pixels
1121 (WebCore::FEBlendUtilitiesNEON::lighten): calculate lighten mode blending for two pixels
1122 (WebCore::FEBlend::platformApplyNEON):
1124 2012-07-13 Ilya Tikhonovsky <loislo@chromium.org>
1126 Web Inspector: native memory instrumentation: extract instrumentation methods into MemoryClassInfo
1127 https://bugs.webkit.org/show_bug.cgi?id=91227
1129 Reviewed by Pavel Feldman.
1131 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1133 MemoryClassInfo<Node> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
1134 info.visitBaseClass<ScriptWrappable>(this);
1136 info.addMember(m_notInstrumentedPointer); // automatically detects poniter/reference
1137 info.addInstrumentedMember(m_next);
1138 info.addHashSet<MemoryInstrumentation::NonClass>(m_aHash); // NonClass value_type (report only size of internal template structures)
1139 info.addHashSet<MemoryInstrumentation::NotInstrumentedClass>(m_aHashSet); // not instrumented value_type (use sizeof)
1140 info.addHashSet<MemoryInstrumentation::InstrumentedClass>(m_aHashSet); // instrumented value_type (call visit)
1143 The change is covered by existing tests for native memory snapshot.
1145 * bindings/v8/DOMDataStore.cpp:
1146 (WebCore::DOMDataStore::reportMemoryUsage):
1147 * bindings/v8/IntrusiveDOMWrapperMap.h:
1148 (WebCore::ChunkedTable::reportMemoryUsage):
1149 * bindings/v8/ScriptWrappable.h:
1150 (WebCore::ScriptWrappable::reportMemoryUsage):
1151 * bindings/v8/V8Binding.cpp:
1152 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
1153 (WebCore::StringCache::reportMemoryUsage):
1154 * bindings/v8/V8DOMMap.h:
1155 * css/StylePropertySet.h:
1156 (WebCore::StylePropertySet::reportMemoryUsage):
1157 * dom/CharacterData.cpp:
1158 (WebCore::CharacterData::reportMemoryUsage):
1159 * dom/ContainerNode.h:
1160 (WebCore::ContainerNode::reportMemoryUsage):
1162 (WebCore::Document::reportMemoryUsage):
1164 (WebCore::Element::reportMemoryUsage):
1165 * dom/ElementAttributeData.h:
1166 (WebCore::ElementAttributeData::reportMemoryUsage):
1167 * dom/MemoryInstrumentation.h:
1168 (MemoryInstrumentation):
1169 (WebCore::MemoryObjectInfo::objectType):
1170 (WebCore::MemoryObjectInfo::objectSize):
1171 (WebCore::MemoryObjectInfo::memoryInstrumentation):
1173 (WebCore::MemoryObjectInfo::reportObjectInfo):
1176 (WebCore::MemoryClassInfo::MemoryClassInfo):
1177 (WebCore::MemoryClassInfo::visitBaseClass):
1178 (WebCore::MemoryClassInfo::reportInstrumentedPointer):
1179 (WebCore::MemoryClassInfo::reportInstrumentedObject):
1180 (WebCore::MemoryClassInfo::reportPointer):
1181 (WebCore::MemoryClassInfo::reportObject):
1182 (WebCore::MemoryClassInfo::reportHashMap):
1183 (WebCore::MemoryClassInfo::reportHashSet):
1184 (WebCore::MemoryClassInfo::reportListHashSet):
1185 (WebCore::MemoryClassInfo::reportVector):
1186 (WebCore::MemoryClassInfo::reportString):
1188 (WebCore::Node::reportMemoryUsage):
1189 * dom/QualifiedName.h:
1190 (WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
1191 (WebCore::QualifiedName::reportMemoryUsage):
1192 * platform/TreeShared.h:
1193 (WebCore::TreeShared::reportMemoryUsage):
1195 2012-07-13 Pavel Feldman <pfeldman@chromium.org>
1197 Web Inspector: align scope filters
1198 https://bugs.webkit.org/show_bug.cgi?id=91213
1200 Reviewed by Vsevolod Vlasov.
1202 * inspector/front-end/elementsPanel.css:
1204 * inspector/front-end/inspector.css:
1205 (.status-bar > div):
1208 (.scope-bar li.all):
1209 * inspector/front-end/networkLogView.css:
1211 2012-07-13 Peter Rybin <peter.rybin@gmail.com>
1213 Web Inspector: too many hardcoded strings in InspectorBackendDispatcher.
1214 https://bugs.webkit.org/show_bug.cgi?id=89198
1216 Reviewed by Yury Semikhatsky.
1218 Instead of generating error message string on every call (mostly for nothing),
1219 error message is generated deeper inside the handler and only command name
1220 is passed every time.
1222 * inspector/CodeGeneratorInspector.py:
1223 (Generator.process_command):
1225 2012-07-13 Joshua Netterfield <jnetterfield@rim.com>
1227 [BlackBerry] Update about:* pages
1228 https://bugs.webkit.org/show_bug.cgi?id=91121
1230 Reviewed by Yong Li.
1232 Update the about:config pages, and improve the aesthetics of the about:build, about:version, about:credits, about:memory, about:config, and similar pages.
1234 No new tests, because there is no new funtionality.
1236 * platform/network/blackberry/NetworkJob.cpp: Update the aesthetics of about:* pages
1238 2012-07-13 Olivier Blin <olivier.blin@softathome.com>
1240 Fix checking for optional DeviceOrientationEvent.absolute in JSC bindings
1241 https://bugs.webkit.org/show_bug.cgi?id=91225
1243 Reviewed by Steve Block.
1245 This issue comes from r105036
1247 * bindings/js/JSDeviceOrientationEventCustom.cpp:
1248 (WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
1250 2012-07-13 Andrei Bucur <abucur@adobe.com>
1251 [CSS Regions] Fix build for bug 89000
1252 https://bugs.webkit.org/show_bug.cgi?id=91215
1254 Reviewed by Kentaro Hara.
1256 Remove the unused variable m_state that was a leftover from a previous version of the patch.
1258 Tests: No new tests, build fix.
1260 * dom/WebKitNamedFlow.cpp:
1261 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1262 * dom/WebKitNamedFlow.h:
1265 2012-07-13 Kenichi Ishibashi <bashi@chromium.org>
1267 [Chromium] Fix bugs in HarfBuzzShaper
1268 https://bugs.webkit.org/show_bug.cgi?id=90951
1270 Reviewed by Tony Chang.
1272 The current implementation has following problems:
1273 - Cannot render RTL text if the TextRun is divided into more than two
1275 - Script handling in TextRun partitioning is incorrect.
1276 - Inaccurate calculation of selection rect.
1277 - Wrong rendering position when the first glyph of the TextRun have
1278 non-zero offsets in terms of HarfBuzz.
1280 To fix these problems I rewrote HarfBuzzShaper class. Here is the summary:
1281 - Divide the whole range of TextRun first, then shape them in visual
1283 - Divide TextRun in the same way of old-harfbuzz's
1284 hb_utf16_script_run_next().
1285 - Prefer float than int when calculating selection.
1286 - Adjust the drawing point after shaping.
1288 Added tests covers the fix except for the last problem. The last problem will be covered
1289 by fast/text/international/complex-joining-using-gpos.html after chromium linux port switches
1290 to use HarfBuzzShaper.
1292 Tests: fast/text/shaping/shaping-script-order.html
1293 fast/text/shaping/shaping-selection-rect.html
1295 * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
1296 (WebCore::Font::drawComplexText): Adjusts point after shaping.
1297 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1298 (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
1300 (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Added.
1301 (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndAdvance): Offsets are no longer needed.
1302 (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset): Calculates character offset based on advance.
1303 (WebCore::normalizeCharacters): Added.
1304 (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1305 (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
1306 (WebCore::HarfBuzzShaper::shape): Divides TextRun first, then shapes them.
1307 (WebCore::HarfBuzzShaper::adjustStartPoint): Added.
1308 (WebCore::HarfBuzzShaper::collectHarfBuzzRuns): Added.
1309 (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added.
1310 (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Followed other changes.
1311 (WebCore::HarfBuzzShaper::selectionRect): Use float for calculating selection.
1312 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
1313 (HarfBuzzShaper): Holds the start index of character. Removed unnecessary variables.
1314 (WebCore::HarfBuzzShaper::HarfBuzzRun::create): Ditto.
1316 (WebCore::HarfBuzzShaper::HarfBuzzRun::fontData): Added.
1317 (WebCore::HarfBuzzShaper::HarfBuzzRun::startIndex): Ditto.
1318 (WebCore::HarfBuzzShaper::HarfBuzzRun::glyphs): Ditto.
1319 (WebCore::HarfBuzzShaper::HarfBuzzRun::advances): Ditto.
1321 2012-07-13 Kentaro Hara <haraken@chromium.org>
1323 Unreviewed, rolling out r122545.
1324 http://trac.webkit.org/changeset/122545
1325 https://bugs.webkit.org/show_bug.cgi?id=91185
1327 We found that this was a wrong fix
1329 * bindings/scripts/CodeGeneratorJS.pm:
1330 (GenerateImplementation):
1332 2012-07-13 Kentaro Hara <haraken@chromium.org>
1334 Unreviewed, rolling out r122553.
1335 http://trac.webkit.org/changeset/122553
1336 https://bugs.webkit.org/show_bug.cgi?id=91198
1338 We found that this was a wrong fix
1340 * bindings/scripts/CodeGeneratorJS.pm:
1341 (GenerateImplementation):
1343 2012-07-13 Kent Tamura <tkent@chromium.org>
1345 Change the timing of form state restore
1346 https://bugs.webkit.org/show_bug.cgi?id=89962
1348 Reviewed by Hajime Morita.
1350 For a preparation to fix a form identification problem (Bug 91209),
1351 restore controls states when the parsing of their owner forms is
1352 completed. For controls without owners, their states are restored when
1353 their parsing is completed as ever.
1355 No new tests. This doesn't change observable behavior.
1357 * html/FormController.cpp:
1358 (WebCore::ownerFormForState):
1359 Added. This code was used in formKey(), and restoreControlState*() use it.
1360 (WebCore::FormKeyGenerator::formKey): Use ownerFormForState(). No behavior change.
1361 (WebCore::FormController::restoreControlStateFor):
1362 Moved some code from HTMLFormControlElementWithState::finishParsingChildren().
1363 The difference is we don't resotre state if this control is owned by a form.
1364 (WebCore::FormController::restoreControlStateIn):
1365 Restore states of associated controls. This is called from
1366 finishParsingChildren() for <form>.
1367 * html/FormController.h:
1369 - Declare restoreControlStateFor() and restoreControlStateIn().
1370 - Make takeStateForFormElement() private.
1372 * html/FormAssociatedElement.cpp:
1373 (WebCore::FormAssociatedElement::isFormControlElementWithState):
1374 Added. The default implementation returns false.
1375 * html/FormAssociatedElement.h:
1376 (FormAssociatedElement):
1377 Added isFormControlElementWithState() for FormController::restoreControlStateIn().
1378 * html/HTMLFormControlElementWithState.cpp:
1379 (WebCore::HTMLFormControlElementWithState::finishParsingChildren):
1380 Some code was moved to FormController:restoreControlStateFor().
1381 (WebCore::HTMLFormControlElementWithState::isFormControlElementWithState):
1382 Added. Returns true.
1383 * html/HTMLFormControlElementWithState.h:
1384 (HTMLFormControlElementWithState): Declare isFormControlElementWithState().
1385 * html/HTMLFormElement.cpp:
1386 (WebCore::HTMLFormElement::finishParsingChildren):
1387 Added. Calls FormController::restoreControlStateIn().
1388 * html/HTMLFormElement.h:
1389 (HTMLFormElement): Declare finishParsingChildren().
1391 2012-07-13 Kent Tamura <tkent@chromium.org>
1393 Make calendar pickers testable
1394 https://bugs.webkit.org/show_bug.cgi?id=84827
1396 Reviewed by Hajime Morita.
1399 - Add PagePopupDriver, an interface to open/close a PagePopup.
1400 - Add setPagePopupDriver() to ChromeClient in order to inject a
1401 PagePopupDriver for testing.
1404 Add MockPagePopupDriver, which creates a MockPagePopup, which creates a
1405 normal <iframe> in the top-level document, and load the popup content on
1406 it. MockPagePopupDriver is enabled by
1407 internals.settings.setEnableMockPagePopup(true).
1409 Test: fast/forms/date/calendar-picker-appearance.html
1411 * WebCore.gypi: Add new files.
1412 * WebCore.xcodeproj/project.pbxproj: Add files to make this buildable.
1413 * page/ChromeClient.h:
1414 (ChromeClient): Add function for PagePopupDriver.
1415 * loader/EmptyClients.h: Add empty implementations for PagePopupDriver functions.
1416 * page/PagePopupDriver.h: Added.
1418 (WebCore::PagePopupDriver::~PagePopupDriver):
1420 * testing/InternalSettings.cpp:
1421 (WebCore::InternalSettings::Backup::restoreTo): Reset the mock PagePopupDriver.
1422 (WebCore::InternalSettings::setEnableMockPagePopup):
1423 Register MockPagePopupDriver to ChromeClient.
1424 * testing/InternalSettings.h:
1425 (InternalSettings): Declare setEnableMockPagePopup().
1426 * testing/InternalSettings.idl: ditto.
1427 * testing/MockPagePopupDriver.cpp: Added.
1428 (MockPagePopup): Pseudo PagePopup implementation with the standard <iframe>.
1429 (WebCore::MockPagePopupDriver::MockPagePopupDriver): Added.
1430 (WebCore::MockPagePopupDriver::create): Added.
1431 (WebCore::MockPagePopupDriver::~MockPagePopupDriver): Added.
1432 (WebCore::MockPagePopupDriver::openPagePopup):
1433 Added. An override of PagePopupDriver function. This creates a MockPagePopup.
1434 (WebCore::MockPagePopupDriver::closePagePopup):
1435 Added. An override of PagePopupDriver function. This deletes the MockPagePopup.
1436 * testing/MockPagePopupDriver.h:
1437 (MockPagePopupDriver): Added.
1439 * testing/v8/WebCoreTestSupport.cpp:
1440 (WebCoreTestSupport::injectPagePopupController):
1441 Added. Production code uses per-Page context feature framework. However
1442 MockPagePopup uses the same page as the host page. So we can't use the
1443 framework and need to inject window.pagePopupController manually.
1444 * testing/v8/WebCoreTestSupport.h:
1445 (WebCoreTestSupport): Add injectPagePopupController().
1447 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
1449 Web Inspector: mute the native looks of the selects in the console.
1450 https://bugs.webkit.org/show_bug.cgi?id=91120
1452 Reviewed by Vsevolod Vlasov.
1454 This is necessary for Mac now that we don't use border images for select.
1456 * inspector/front-end/ConsoleView.js:
1457 (WebInspector.ConsoleView.prototype.get statusBarItems):
1458 (WebInspector.ConsoleView.prototype.addContext):
1459 (WebInspector.ConsoleView.prototype.removeContext):
1460 (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
1461 (WebInspector.ConsoleView.prototype._appendIsolatedContextOption):
1462 (WebInspector.ConsoleView.prototype._currentEvaluationContext):
1463 (WebInspector.ConsoleView.prototype._currentIsolatedContextId):
1464 * inspector/front-end/StatusBarButton.js:
1465 (WebInspector.StatusBarComboBox):
1466 (WebInspector.StatusBarComboBox.prototype.addOption):
1467 (WebInspector.StatusBarComboBox.prototype.removeOption):
1468 (WebInspector.StatusBarComboBox.prototype.removeOptions):
1469 (WebInspector.StatusBarComboBox.prototype.selectedOption):
1470 * inspector/front-end/inspector.css:
1471 (.status-bar-select-container):
1472 (select.status-bar-item):
1475 2012-07-13 Andrei Bucur <abucur@adobe.com>
1477 [CSS Regions] Fix the lifecycle for the flow objects and their renderers
1478 https://bugs.webkit.org/show_bug.cgi?id=89000
1480 Reviewed by Eric Seidel.
1482 This patch adds the concept of a NamedFlowCollection, owned by the document, that keeps track of
1483 all the named flows that exist in the Document. This collection contains a ListHashSet of weak references to
1484 all the existing NamedFlows in the document. This is not a managed set because the CREATED flows are referenced from the renderer and
1485 the NULL flows are only cached, they should be destructible.
1486 Two named flows are considered to be equal if they have the same name.
1487 I've changed the NamedFlow state to depend on the existence of its renderer. A flow thread that has a renderer will also have a NamedFlow object.
1488 A flow thread without a renderer can have a NamedFlow object, but only in the NULL state. It's possible for a NamedFlow object to jump from the
1489 NULL state to the CREATED state if it was not destroyed (e.g. it was referenced from JS). Keeping track of the NULL state flows that have listeners will be important
1490 so when they go back to the CREATED state, the listeners would still be there.
1492 Link to spec: http://www.w3.org/TR/2012/WD-css3-regions-20120503/
1494 Tests: The old tests have been modified to take into account the new behavior
1497 * GNUmakefile.list.am:
1500 * WebCore.vcproj/WebCore.vcproj:
1501 * WebCore.xcodeproj/project.pbxproj:
1502 * dom/DOMAllInOne.cpp:
1504 (WebCore::Document::~Document):
1506 (WebCore::Document::webkitGetFlowByName):
1507 (WebCore::Document::namedFlows):
1511 * dom/WebKitNamedFlow.cpp:
1512 (WebCore::WebKitNamedFlow::WebKitNamedFlow):
1513 (WebCore::WebKitNamedFlow::~WebKitNamedFlow):
1514 (WebCore::WebKitNamedFlow::create):
1516 (WebCore::WebKitNamedFlow::name):
1517 (WebCore::WebKitNamedFlow::overset):
1518 (WebCore::nodeInFlowThread):
1519 (WebCore::WebKitNamedFlow::getRegionsByContentNode):
1520 (WebCore::WebKitNamedFlow::getContent):
1521 (WebCore::WebKitNamedFlow::setRenderer):
1522 * dom/WebKitNamedFlow.h:
1525 (WebCore::WebKitNamedFlow::getFlowState):
1526 (WebCore::WebKitNamedFlow::switchFlowState):
1527 * dom/WebKitNamedFlowCollection.cpp: Added.
1529 (WebCore::WebKitNamedFlowCollection::WebKitNamedFlowCollection):
1530 (WebCore::WebKitNamedFlowCollection::length): An O(1) operation
1531 (WebCore::WebKitNamedFlowCollection::item): An O(N) operation
1532 (WebCore::WebKitNamedFlowCollection::flowByName): An O(1) operation
1533 (WebCore::WebKitNamedFlowCollection::ensureNamedFlowInCreatedState): An O(1) operation
1534 (WebCore::WebKitNamedFlowCollection::moveNamedFlowToNullState): An O(1) operation
1535 (WebCore::WebKitNamedFlowCollection::discardNamedFlow): An O(1) operation
1536 (WebCore::WebKitNamedFlowCollection::documentDestroyed):
1537 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::hash):
1538 (WebCore::WebKitNamedFlowCollection::NamedFlowHashFunctions::equal):
1539 (WebKitNamedFlowCollection::NamedFlowHashFunctions):
1540 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::hash):
1541 (WebCore::WebKitNamedFlowCollection::NamedFlowHashTranslator::equal):
1542 * dom/WebKitNamedFlowCollection.h: Copied from Source/WebCore/dom/WebKitNamedFlow.h.
1544 (WebKitNamedFlowCollection):
1545 (WebCore::WebKitNamedFlowCollection::create):
1546 (WebCore::WebKitNamedFlowCollection::document):
1547 * rendering/FlowThreadController.cpp:
1548 (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
1549 (WebCore::FlowThreadController::removeFlowThread):
1551 * rendering/FlowThreadController.h:
1552 (FlowThreadController):
1553 * rendering/RenderNamedFlowThread.cpp:
1554 (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
1556 (WebCore::RenderNamedFlowThread::~RenderNamedFlowThread):
1557 (WebCore::RenderNamedFlowThread::removeRegionFromThread):
1558 (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode):
1559 (WebCore::RenderNamedFlowThread::flowThreadName):
1560 (WebCore::RenderNamedFlowThread::willBeDestroyed):
1561 * rendering/RenderNamedFlowThread.h:
1562 (RenderNamedFlowThread):
1563 (WebCore::RenderNamedFlowThread::contentNodes):
1564 (WebCore::RenderNamedFlowThread::canBeDestroyed):
1566 2012-07-13 Vineet Chaudhary <rgf748@motorola.com>
1568 [V8Bindings] Implement generalised method to validates that the passed object is a sequence type.
1569 https://bugs.webkit.org/show_bug.cgi?id=91056
1571 Reviewed by Kentaro Hara.
1573 Currently the V8 implementation validates that the passed object is a sequence type only
1574 for MessagePort in V8Utilities::extractTransferables().
1575 There should be generalised method for other types too.
1576 Spec URL: http://www.w3.org/TR/2012/WD-WebIDL-20120207/#es-sequence
1578 No new test, Just refactoring. There should be no behavioral changes.
1580 * bindings/v8/V8Binding.h:
1581 (WebCore::toV8Sequence): Added implementation of toV8Sequence().
1583 2012-07-13 Zeno Albisser <zeno@webkit.org>
1585 [Qt][WK2] Implement GraphicsSurface for Linux/GLX.
1586 https://bugs.webkit.org/show_bug.cgi?id=90881
1588 Add a GLX based GraphicsSurface implementation for Linux.
1589 Native X windows are being used for exchanging textures
1592 Reviewed by Noam Rosenthal.
1596 * platform/graphics/surfaces/GraphicsSurface.cpp:
1597 (WebCore::GraphicsSurface::create):
1598 Move creating GraphicsSurface instance into
1599 platformCreate/platformImport functions to allow
1600 platform specific creation based on the provided flags.
1601 (WebCore::GraphicsSurface::GraphicsSurface):
1602 (WebCore::GraphicsSurface::~GraphicsSurface):
1603 Call platformDestroy when destroying a GraphicsSurface.
1605 * platform/graphics/surfaces/GraphicsSurface.h:
1606 Make platformCreate/platformImport functions static
1607 to be able to call these from the static create function.
1608 Add Destructor prototype and add GraphicsSurfacePrivate member.
1611 * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
1613 (WebCore::GraphicsSurface::platformCreate):
1614 (WebCore::GraphicsSurface::platformImport):
1615 Insert creation of GraphicsSurface instance.
1616 This allows having a platform specific creation mechanism
1618 * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Added.
1620 (OffScreenRootWindow):
1621 (WebCore::OffScreenRootWindow::OffScreenRootWindow):
1622 (WebCore::OffScreenRootWindow::get):
1623 (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
1624 Add an OffScreenRootWindow singelton that is being used
1625 as a parent for all native offscreen windows.
1626 (GraphicsSurfacePrivate):
1627 This class is used to manage all the X related resources
1628 such as opening a display or creating XPixmaps etc.
1629 (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1630 Open a connection to the X server and create a
1631 QOpenGLContext that can be used to resolve GL functions.
1632 (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
1633 Properly cleanup and release all the X resources again.
1634 (WebCore::GraphicsSurfacePrivate::createSurface):
1635 Create a surface that is placed off screen and can be
1636 used as a rendering target by the WebProcess.
1637 (WebCore::GraphicsSurfacePrivate::createPixmap):
1638 Create a GLXPixmap from the XWindow that was previously
1639 redirected by the WebProcess. This GLXPixmap can then be
1640 bound to a texture and being painted on screen by the
1642 (WebCore::GraphicsSurfacePrivate::makeCurrent):
1643 (WebCore::GraphicsSurfacePrivate::swapBuffers):
1644 (WebCore::GraphicsSurfacePrivate::display):
1645 (WebCore::GraphicsSurfacePrivate::glxPixmap):
1646 (WebCore::GraphicsSurfacePrivate::size):
1647 (WebCore::GraphicsSurfacePrivate::glContext):
1648 (WebCore::resolveGLMethods):
1649 Initialize all the function pointers for the GL functions used.
1650 (WebCore::GraphicsSurface::platformExport):
1651 (WebCore::GraphicsSurface::platformGetTextureID):
1652 Bind the GLXPixmap to a texture.
1653 (WebCore::GraphicsSurface::platformCopyToGLTexture):
1654 Not beeing implemented for GLX.
1655 (WebCore::GraphicsSurface::platformCopyFromFramebuffer):
1656 Blit origin fbo onto the GraphicsSurface's backing.
1657 (WebCore::GraphicsSurface::platformCreate):
1658 (WebCore::GraphicsSurface::platformImport):
1659 (WebCore::GraphicsSurface::platformLock):
1660 (WebCore::GraphicsSurface::platformUnlock):
1661 (WebCore::GraphicsSurface::platformDestroy):
1663 2012-07-13 Dongwoo Im <dw.im@samsung.com>
1665 CodeGeneratorJS.pm : SetterExpression should use 'push' rather than 'unshift'
1666 https://bugs.webkit.org/show_bug.cgi?id=91198
1668 Reviewed by Kentaro Hara.
1670 'SetterExpression' should use 'push' to make arguments, rather than 'unshift'.
1672 No new tests. Covered by existing tests.
1674 * bindings/scripts/CodeGeneratorJS.pm:
1675 (GenerateImplementation):
1677 2012-07-13 Yoshifumi Inoue <yosin@chromium.org>
1679 REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
1680 https://bugs.webkit.org/show_bug.cgi?id=91197
1682 Reviewed by Kent Tamura.
1684 This patch fixes implementation of Decimal::ceiling() and floor().
1685 They return wrong value for small fractional numbers.
1687 The bug is occurred when:
1688 - Step-able input type, e.g. number, date, datetime, and so on.
1689 - Current value is step mismatched
1690 - Current value is smaller than step
1691 - Step up/down by spin button
1692 because spin button up/down actions are implemented in InputType::setpUpFromRenderer
1693 which calls Decimal::ceiling() and floor() for step mismatched case.
1695 Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
1696 WebKit/chromium/tests/DecimalTest.cpp: Added test cases
1698 * platform/Decimal.cpp:
1699 (WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
1700 (WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
1702 2012-07-13 Dominic Mazzoni <dmazzoni@google.com>
1704 Should be possible to focus elements within canvas fallback content
1705 https://bugs.webkit.org/show_bug.cgi?id=87898
1707 Reviewed by Chris Fleizach.
1709 Patches isFocusable in dom/Node.cpp and html/HTMLFormControlElement.cpp
1710 to make elements focusable if they're a descendent of a canvas element
1711 if they would otherwise have been focusable but just didn't have
1712 a renderer. Adds a bit to ElementRareData to efficiently keep track
1713 of elements in a canvas subtree.
1715 Test: fast/canvas/fallback-content.html
1718 (WebCore::Element::attach):
1719 (WebCore::Element::detach):
1720 (WebCore::Element::setIsInCanvasSubtree):
1722 (WebCore::Element::isInCanvasSubtree):
1725 * dom/ElementRareData.h:
1727 (WebCore::ElementRareData::ElementRareData):
1729 (WebCore::Node::isFocusable):
1730 * html/HTMLCanvasElement.cpp:
1731 (WebCore::HTMLCanvasElement::attach):
1733 * html/HTMLCanvasElement.h:
1734 (HTMLCanvasElement):
1735 * html/HTMLFormControlElement.cpp:
1736 (WebCore::HTMLFormControlElement::isFocusable):
1738 2012-07-12 Carlos Garcia Campos <cgarcia@igalia.com>
1740 [GTK] Add API to get HTTPS status to WebKit2 GTK+
1741 https://bugs.webkit.org/show_bug.cgi?id=91100
1743 Reviewed by Martin Robinson.
1745 * platform/network/soup/ResourceResponse.h:
1746 (WebCore::ResourceResponse::soupMessageCertificate): Return the
1748 (WebCore::ResourceResponse::setSoupMessageCertificate): Set a
1750 (WebCore::ResourceResponse::soupMessageTLSErrors): Return the TLS
1752 (WebCore::ResourceResponse::setSoupMessageTLSErrors): Set TLS
1754 * platform/network/soup/ResourceResponseSoup.cpp:
1755 (WebCore::ResourceResponse::toSoupMessage): Set the certificate
1756 and TLS errors to the newly created SoupMessage.
1757 (WebCore::ResourceResponse::updateFromSoupMessage): Get the
1758 certificate and TLS errors from the SoupMessage.
1760 2012-07-13 Ryosuke Niwa <rniwa@webkit.org>
1762 RadioNodeList is not updated upon input type change
1763 https://bugs.webkit.org/show_bug.cgi?id=91178
1765 Reviewed by Alexey Proskuryakov.
1767 Invalidate the radio node lists when type content attribute changes since it excludes
1768 image type input elements.
1770 Test: fast/forms/radionodelist-image-type.html
1773 (WebCore::shouldInvalidateNodeListForType):
1774 * dom/Document.h: Renamed InvalidateOnIdNameForAttrChange to InvalidateOnFormAttrChange
1775 since listing all attribute name isn't useful at this point.
1776 * html/RadioNodeList.cpp:
1777 (WebCore::RadioNodeList::RadioNodeList):
1779 2012-07-12 Dongwoo Im <dw.im@samsung.com>
1781 CodeGeneratorJS.pm need to handle the attribute which has "CallWith=ScriptExecutionContext" option.
1782 https://bugs.webkit.org/show_bug.cgi?id=91185
1784 Reviewed by Kentaro Hara.
1786 When an attribute has "CallWith=ScriptExecutionContext" option, 'ScriptExecutionContext*' parameter should be the last parameter.
1788 No new tests. Covered by existing tests.
1790 * bindings/scripts/CodeGeneratorJS.pm:
1791 (GenerateImplementation):
1793 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
1795 REGRESSION(r117738): [Forms] stepMismatch for input type "time" with large step value always return false.
1796 https://bugs.webkit.org/show_bug.cgi?id=91062
1798 Reviewed by Kent Tamura.
1800 This patch changes value of StepRange::acceptableError to zero for
1801 integer restricted step value.
1803 No new tests, existing test covers (fast/forms/time/ValidityState-stepMismatch-time.html) this change although they are listed in TestExpectation file.
1805 * html/StepRange.cpp:
1806 (WebCore::StepRange::acceptableError): Changed to return 0 if step value is restricted to be an integer.
1808 2012-07-12 Dan Bernstein <mitz@apple.com>
1810 Pass an option flag to CFStringGetHyphenationLocationBeforeIndex() that tells it to not
1811 terminate the search at the last word boundary before the given index.
1813 Reviewed by Adele Peterson.
1815 No test, because the current version of Core Foundation ignores the options parameter.
1817 * platform/text/cf/HyphenationCF.cpp:
1818 (WebCore::lastHyphenLocation): Changed the options parameter from 0 to 1.
1820 2012-07-12 Eric Seidel <eric@webkit.org>
1822 Incorrect behaviour calling Range setStart or setEnd with boundary in different document
1823 https://bugs.webkit.org/show_bug.cgi?id=42517
1825 Reviewed by Ojan Vafai.
1827 Added a new static inline "checkForDifferentRootContainer" to share some code
1828 and made setStart/setEnd do the right thing in the x-document case. I removed
1829 the bogus checks in set*After/set*Before functions, and since they just call
1830 through to setStart/setEnd, they also now do the right thing.
1832 Test: fast/dom/Range/set-wrong-document-err.html
1835 (WebCore::checkForDifferentRootContainer):
1837 (WebCore::Range::setStart):
1838 (WebCore::Range::setEnd):
1839 (WebCore::Range::setStartAfter):
1840 (WebCore::Range::setEndBefore):
1841 (WebCore::Range::setEndAfter):
1842 (WebCore::Range::setStartBefore):
1844 2012-07-12 Erik Arvidsson <arv@chromium.org>
1846 [V8] Simplify CodeGeneratorV8 since V8OnProto is only true for DOMWindow
1847 https://bugs.webkit.org/show_bug.cgi?id=91165
1849 Reviewed by Nate Chapin.
1851 The old code was dead code since V8OnProto only ever gets set to 1 for DOMWindow.
1853 No new tests. No change in functionality.
1855 * bindings/scripts/CodeGeneratorV8.pm:
1856 (GenerateNormalAttrSetter):
1858 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1860 Build fix. Initialize unused const member variables to make compilers happy.
1862 * dom/DynamicNodeList.h:
1863 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1865 2012-07-12 Konrad Piascik <kpiascik@rim.com>
1867 Web Inspector: Geolocation override
1868 https://bugs.webkit.org/show_bug.cgi?id=89365
1870 Reviewed by Pavel Feldman.
1872 Reverted original patch.
1873 Change has not been reviewed by the right people. It declares
1874 public protocol methods and is wrong in several ways.
1876 * Modules/geolocation/GeolocationController.cpp:
1877 (WebCore::GeolocationController::GeolocationController):
1878 (WebCore::GeolocationController::positionChanged):
1879 * Modules/geolocation/GeolocationController.h:
1880 (GeolocationController):
1881 * inspector/Inspector.json:
1882 * inspector/InspectorInstrumentation.cpp:
1884 * inspector/InspectorInstrumentation.h:
1886 (InspectorInstrumentation):
1887 * inspector/InspectorPageAgent.cpp:
1888 (WebCore::InspectorPageAgent::InspectorPageAgent):
1889 * inspector/InspectorPageAgent.h:
1890 * inspector/front-end/Settings.js:
1891 * inspector/front-end/SettingsScreen.js:
1892 (WebInspector.UserAgentSettingsTab):
1893 (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
1894 * inspector/front-end/UserAgentSupport.js:
1896 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
1898 Move m_type and m_hasNameCache from HTMLCollectionCacheBase to DynamicNodeListCacheBase for better bit packing
1899 https://bugs.webkit.org/show_bug.cgi?id=91164
1901 Reviewed by Anders Carlsson.
1903 Moved m_type and m_hasNameCache from HTMLCollection and renamed them to m_collectionType and m_isNameCacheValid.
1905 Also renamed shouldIncludeChildren to shouldOnlyIncludeDirectChildren and negated the return value since
1906 all HTMLCollection include children in the collection and the function was meant to tell us whether the collection
1907 should include descendents that are not direct children of base().
1909 In addition, renamed nextNodeOrSibling to nextNode since "or sibling" doesn't seem to add any semantic clarity.
1911 * dom/DynamicNodeList.h:
1912 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1913 (DynamicNodeListCacheBase):
1914 (WebCore::DynamicNodeListCacheBase::type):
1915 (WebCore::DynamicNodeListCacheBase::hasNameCache):
1916 (WebCore::DynamicNodeListCacheBase::setHasNameCache):
1917 (WebCore::DynamicNodeListCacheBase::clearCache):
1918 * html/HTMLCollection.cpp:
1919 (WebCore::shouldOnlyIncludeDirectChildren):
1920 (WebCore::HTMLCollection::HTMLCollection):
1921 (WebCore::HTMLCollection::isAcceptableElement):
1922 (WebCore::nextNode):
1923 (WebCore::HTMLCollection::itemAfter):
1924 * html/HTMLCollection.h:
1925 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1926 (HTMLCollectionCacheBase):
1927 (WebCore::HTMLCollectionCacheBase::clearCache):
1929 2012-07-12 Shinya Kawanaka <shinyak@chromium.org>
1931 Needs callback before AuthorShadowRoot is added.
1932 https://bugs.webkit.org/show_bug.cgi?id=91167
1934 Reviewed by Hajime Morita.
1936 This is a preliminary patch for adding multiple Shadow DOM support for media elements and form elements.
1937 They assume that UserAgentShadowRoot is the oldest, however currently a page author may try to add
1938 AuthorShadowRoot before adding UserAgentShadowRoot.
1940 This patch adds a callback before AuthorShadowRoot is being added, and allow us to add UserAgentShadowRoot
1941 for those elements. See also Bug 77936, Bug 77937, Bug 90532.
1944 (WebCore::Element::willAddAuthorShadowRoot):
1945 * dom/ElementShadow.cpp:
1946 (WebCore::ElementShadow::addShadowRoot):
1947 * dom/ElementShadow.h:
1949 * dom/ShadowRoot.cpp:
1950 (WebCore::ShadowRoot::create):
1952 2012-07-12 Dana Jansens <danakj@chromium.org>
1954 [chromium] Remove the RenderPass pointer from RenderPassDrawQuad
1955 https://bugs.webkit.org/show_bug.cgi?id=91023
1957 Reviewed by Adrienne Walker.
1959 Removes the RenderPass pointer and keeps only an integer id in the
1960 quad to refer back to the RenderPass the quad reads from.
1962 Covered by existing tests.
1964 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1965 (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1966 (WebCore::findRenderPassById):
1968 (WebCore::removeRenderPassesRecursive):
1969 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1970 (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1971 (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1972 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1973 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1975 (CullRenderPassesWithCachedTextures):
1976 (CullRenderPassesWithNoQuads):
1977 (CCLayerTreeHostImpl):
1978 * platform/graphics/chromium/cc/CCRenderPass.cpp:
1979 (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
1980 * platform/graphics/chromium/cc/CCRenderPass.h:
1982 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
1983 (WebCore::CCRenderPassDrawQuad::create):
1984 (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
1985 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
1986 (CCRenderPassDrawQuad):
1987 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1988 (WebCore::CCRenderSurface::appendQuads):
1989 * platform/graphics/chromium/cc/CCRenderSurface.h:
1992 2012-07-12 Elliott Sprehn <esprehn@gmail.com>
1994 Unneeded tree walking when adding or removing children due to RenderCounter / RenderQuote logic
1995 https://bugs.webkit.org/show_bug.cgi?id=89900
1997 Reviewed by Eric Seidel and Abhishek Arya.
1999 Previously we would walk the all children a renderer whenever adding
2000 or removing a child renderer from its RenderObjectChildList to look for
2001 RenderQuote and RenderCounter instances to update. This patch introduces
2002 a counter in RenderView for the number of RenderQuote and RenderCounter
2003 instances in that document so we can avoid these traversals.
2005 No tests needed since this is just a short circuiting of logic and the existing
2006 tests should cover it.
2008 * rendering/RenderCounter.cpp:
2009 (WebCore::RenderCounter::RenderCounter): Increment instance counter.
2010 (WebCore::RenderCounter::willBeDestroyed): Decrement instance counter.
2012 (WebCore::RenderCounter::rendererRemovedFromTree): Short circuit when counter is zero.
2013 (WebCore::RenderCounter::rendererSubtreeAttached): Short circuit when counter is zero.
2014 * rendering/RenderCounter.h:
2016 * rendering/RenderObjectChildList.cpp:
2017 (WebCore::RenderObjectChildList::removeChildNode): Short circuit calling into Counter and Quote code when the document is being destroyed.
2018 * rendering/RenderQuote.cpp:
2019 (WebCore::RenderQuote::RenderQuote):
2020 (WebCore::RenderQuote::willBeDestroyed):
2022 (WebCore::RenderQuote::rendererSubtreeAttached): Increment instance counter.
2023 (WebCore::RenderQuote::rendererRemovedFromTree): Decrement instance counter.
2024 * rendering/RenderQuote.h:
2026 * rendering/RenderView.cpp:
2027 (WebCore::RenderView::RenderView):
2028 * rendering/RenderView.h: Methods for managing the RenderQuote and RenderCounter counts.
2030 (WebCore::RenderView::addRenderQuote):
2031 (WebCore::RenderView::removeRenderQuote):
2032 (WebCore::RenderView::hasRenderQuotes):
2033 (WebCore::RenderView::addRenderCounter):
2034 (WebCore::RenderView::removeRenderCounter):
2035 (WebCore::RenderView::hasRenderCounters):
2037 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
2039 Merge HTMLCollectionWithArrayStorage into HTMLCollection
2040 https://bugs.webkit.org/show_bug.cgi?id=91144
2042 Reviewed by Anders Carlsson.
2044 Merged HTMLCollectionWithArrayStorage::item into HTMLCollection::item and got rid of
2045 HTMLCollectionWithArrayStorage. Also de-virtualized HTMLCollection::item and HTMLCollection::length
2046 and merged itemInArrayAfter and itemAfter.
2048 In addition, improved the algorithm in HTMLCollection::length to take advantage of item cache.
2049 Instead of always computing the length from the beginning, we start the search from the cached item
2050 so that if we're near end of the collection, we avoid significant portion of the node traversal.
2052 Furthermore, made HTMLCollection always call setItemCache with a non-null item and HTMLCollection::item
2053 set the length cache when it reaches the end of the collection to avoid redundant length calculations.
2055 * dom/DynamicNodeList.h:
2056 (WebCore::DynamicNodeListCacheBase::setItemCache): Add a FIXME.
2057 * html/HTMLCollection.cpp:
2058 (WebCore::HTMLCollection::itemAfter): Regular HTMLCollection doesn't have uses elements array so
2059 assert that offsetInArray is always 0.
2060 (WebCore): Removed calcLength.
2061 (WebCore::HTMLCollection::length): Rewritten. The algorithm is as follows:
2062 When there is no item cache, we look for the first item by calling item(0). If item(0) returns null,
2063 then it must have set the length cache so bail out. If the previous step didn't bail out, then
2064 the item cache is valid and not null (see above), so count the number of remaining items in collection
2065 starting at the cached item's offset + 1.
2066 (WebCore::HTMLCollection::item): Avoid calling setItemCache with null. When the first item is null,
2067 set the length cache instead.
2068 (WebCore::HTMLCollection::itemAfterCachedItem): Extracted from HTMLCollectionWithArrayStorage::item.
2069 (WebCore::HTMLCollection::namedItem): Pass in arrayOffset to itemAfter. Note this variable is never
2070 used since only HTMLFormCollection and HTMLPropertiesCollection use array offsets but they override
2072 (WebCore::HTMLCollection::updateNameCache): Ditto.
2073 * html/HTMLCollection.h:
2076 * html/HTMLFormCollection.cpp: Removed calcLength(). Even though this function didn't iterate over
2077 the collection directly, HTMLFormElement::length and HTMLFieldSetElement::length did so we're not
2078 regressing any performance here.
2079 (WebCore::HTMLFormCollection::HTMLFormCollection):
2080 (WebCore::HTMLFormCollection::itemAfter):
2081 * html/HTMLFormCollection.h:
2082 (HTMLFormCollection):
2083 * html/HTMLNameCollection.cpp:
2084 (WebCore::HTMLNameCollection::itemAfter):
2085 * html/HTMLNameCollection.h:
2086 (HTMLNameCollection):
2087 * html/HTMLPropertiesCollection.cpp: Removed calcLength().
2088 (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
2089 (WebCore::HTMLPropertiesCollection::itemAfter):
2091 * html/HTMLPropertiesCollection.h:
2092 (HTMLPropertiesCollection):
2093 * html/HTMLTableRowsCollection.cpp:
2094 (WebCore::HTMLTableRowsCollection::itemAfter):
2095 * html/HTMLTableRowsCollection.h:
2096 (HTMLTableRowsCollection):
2098 2012-07-12 Pravin D <pravind.2k4@gmail.com>
2100 Row size/position is wrongly calculated when table having overlapping rowspan cell and colspan cell
2101 https://bugs.webkit.org/show_bug.cgi?id=16811
2103 Reviewed by Julien Chaffraix.
2105 The height of a row is calculated by taking the max height of the cells contained in it. When a row contains
2106 a rowSpan cell and if this row is not the last row of the cell, then its height is max height of other non
2107 rowSpan cells. If the row is the last row of the rowSpan cell, then using the contraint laid by CSS2.1 spec
2108 "For a rowSpan cell, the sum of the row heights involved must be great enough to encompass the cell spanning the rows",
2109 the last remaining height of the rowSpan(cell height minus heights of other involved rows) is taken into consideration
2110 while calculating the height of this row.
2111 Currently when calculating the height of the row we are only using the height of the primary cell at position (row, col).
2112 However when a row has colSpan cell and rowSpan, they might overlap. In such a sitution as only the primary cells height
2113 is considered, the height of the row will be calculated worngly if the other overlapping cell has greater height.
2114 Thus all the overlapping cell at position (row, col) must be considered while calculating the height of a row.
2116 Test: fast/table/last-cell-of-rowspan-overlapping-colspan-cell.html
2118 * rendering/RenderTableSection.cpp:
2119 (WebCore::RenderTableSection::calcRowLogicalHeight):
2120 Fixed function to use all the overlapping cells at position(row, col) to calculate the height/position of rows.
2122 2012-07-12 Joshua Bell <jsbell@chromium.org>
2124 IndexedDB: Enable IDBFactory.deleteDatabase() and webkitGetDatabaseNames() in Workers
2125 https://bugs.webkit.org/show_bug.cgi?id=90310
2127 Reviewed by Tony Chang.
2129 Simplify Document vs. Worker logic for IDBFactory::open() and hook up the
2130 other two IDBFactory methods for use by workers as well.
2132 Test: storage/indexeddb/factory-basics-workers.html
2134 * Modules/indexeddb/IDBFactory.cpp:
2135 (isContextValid): Helper function consolidating checks that context is usable.
2136 (getIndexedDBDatabasePath): Helper function for accessing group settings.
2137 (WebCore::IDBFactory::getDatabaseNames): Simplify - just pass context through to back end.
2138 (WebCore::IDBFactory::open): Ditto.
2139 (WebCore::IDBFactory::deleteDatabase): Ditto.
2140 (WebCore::IDBFactory::cmp): Whitespace.
2141 * Modules/indexeddb/IDBFactoryBackendImpl.cpp: Obsolete openFromWorker() removed.
2142 (WebCore::IDBFactoryBackendImpl::getDatabaseNames): Signature updated.
2143 (WebCore::IDBFactoryBackendImpl::deleteDatabase): Signature updated.
2144 (WebCore::IDBFactoryBackendImpl::open): Signature updated.
2145 * Modules/indexeddb/IDBFactoryBackendImpl.h:
2146 (IDBFactoryBackendImpl):
2147 * Modules/indexeddb/IDBFactoryBackendInterface.h: Interface methods now take both SecurityOrigin
2148 and ScriptExecutionContext, but not Frame. In the proxy, SecurityOrigin is redundant (can be
2149 accessed from context) but on the real back end the context is null (as Frame was previously).
2150 (IDBFactoryBackendInterface):
2151 * inspector/InspectorIndexedDBAgent.cpp:
2153 (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
2154 (WebCore::InspectorIndexedDBAgent::requestDatabase):
2155 (WebCore::InspectorIndexedDBAgent::requestData):
2157 2012-07-12 Dana Jansens <danakj@chromium.org>
2159 [chromium] The root layer should not try create a second RenderSurface for itself
2160 https://bugs.webkit.org/show_bug.cgi?id=91124
2162 Reviewed by Adrienne Walker.
2164 Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
2166 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2167 (WebCore::subtreeShouldRenderToSeparateSurface):
2169 2012-07-12 Adam Barth <abarth@webkit.org>
2171 Regression (r122359) Layout Test html5lib/runner.html is failing
2172 https://bugs.webkit.org/show_bug.cgi?id=91047
2174 Reviewed by Tony Chang.
2176 This ASSERT is bogus because doctypes can be removed from the DOM and
2179 Test: fast/viewport/viewport-legacy-xhtmlmp-remove-and-add.html
2182 (WebCore::Document::setDocType):
2184 2012-07-12 Ojan Vafai <ojan@chromium.org>
2186 Implied minimum size of flex items is min-content
2187 https://bugs.webkit.org/show_bug.cgi?id=87546
2189 Reviewed by Tony Chang.
2191 http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
2192 In the main axis direction, min-size of auto means min-content.
2194 Test: css3/flexbox/flex-item-min-size.html
2196 * rendering/RenderBox.cpp:
2197 (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2198 (WebCore::RenderBox::computeContentLogicalHeightUsing):
2199 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2200 (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2201 (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2202 (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2203 It turned out that these FIXMEs are all unnecessary with the changes to RenderFlexibleBox.
2205 * rendering/RenderFlexibleBox.cpp:
2206 (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
2207 (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
2209 2012-07-12 Eric Penner <epenner@google.com>
2211 [chromium] Use CCTexture/TextureAllocator and remove TextureManager
2212 https://bugs.webkit.org/show_bug.cgi?id=91001
2214 Reviewed by Adrienne Walker.
2216 Use CCTexture to clean up CCPrioritizedTexture::Backing.
2217 Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
2218 Minor move/refactoring of link/unlink in CCPrioritizedTexture.
2219 Remove double initialization of the default memory limit.
2221 Covered by existing tests (refactoring).
2224 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
2225 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
2227 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
2228 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
2230 * platform/graphics/chromium/ImageLayerChromium.cpp:
2231 * platform/graphics/chromium/LayerRendererChromium.cpp:
2232 (WebCore::LayerRendererChromium::initialize):
2233 * platform/graphics/chromium/ManagedTexture.cpp: Removed.
2234 * platform/graphics/chromium/ManagedTexture.h: Removed.
2235 * platform/graphics/chromium/RenderSurfaceChromium.h:
2237 * platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
2240 (WebCore::TextureAllocator::~TextureAllocator):
2241 * platform/graphics/chromium/TextureManager.cpp: Removed.
2242 * platform/graphics/chromium/TextureManager.h: Removed.
2243 * platform/graphics/chromium/TiledLayerChromium.cpp:
2244 * platform/graphics/chromium/TrackingTextureAllocator.cpp:
2245 (WebCore::TrackingTextureAllocator::createTexture):
2246 (WebCore::TrackingTextureAllocator::deleteTexture):
2247 * platform/graphics/chromium/TrackingTextureAllocator.h:
2248 * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
2249 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2250 (WebCore::CCLayerTreeHost::prioritizeTextures):
2251 * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2253 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2254 (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
2255 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
2256 (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
2257 (WebCore::CCPrioritizedTexture::setDimensions):
2258 (WebCore::CCPrioritizedTexture::textureId):
2259 (WebCore::CCPrioritizedTexture::bindTexture):
2260 (WebCore::CCPrioritizedTexture::framebufferTexture2D):
2261 (WebCore::CCPrioritizedTexture::link):
2263 (WebCore::CCPrioritizedTexture::unlink):
2264 * platform/graphics/chromium/cc/CCPrioritizedTexture.h:
2266 (WebCore::CCPrioritizedTexture::bytes):
2267 (CCPrioritizedTexture):
2268 (WebCore::CCPrioritizedTexture::haveBackingTexture):
2269 (WebCore::CCPrioritizedTexture::Backing::Backing):
2270 (WebCore::CCPrioritizedTexture::Backing::~Backing):
2271 (WebCore::CCPrioritizedTexture::Backing::owner):
2273 (WebCore::CCPrioritizedTexture::backing):
2274 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
2275 (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
2276 (WebCore::CCPrioritizedTextureManager::requestLate):
2277 (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
2278 (WebCore::CCPrioritizedTextureManager::reduceMemory):
2279 (WebCore::CCPrioritizedTextureManager::clearAllMemory):
2280 (WebCore::CCPrioritizedTextureManager::registerTexture):
2281 (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
2282 (WebCore::CCPrioritizedTextureManager::createBacking):
2283 (WebCore::CCPrioritizedTextureManager::destroyBacking):
2284 (WebCore::CCPrioritizedTextureManager::assertInvariants):
2285 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
2286 (CCPrioritizedTextureManager):
2287 (WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
2288 (WebCore::CCPrioritizedTextureManager::compareBackings):
2289 * platform/graphics/chromium/cc/CCPriorityCalculator.h:
2290 * platform/graphics/chromium/cc/CCScopedTexture.cpp:
2291 * platform/graphics/chromium/cc/CCScopedTexture.h:
2292 * platform/graphics/chromium/cc/CCTexture.h:
2293 (WebCore::CCTexture::CCTexture):
2294 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2296 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2298 2012-07-12 Ryosuke Niwa <rniwa@webkit.org>
2300 Let XCode have its own way.
2302 * WebCore.xcodeproj/project.pbxproj:
2304 2012-07-12 Julien Chaffraix <jchaffraix@webkit.org>
2306 ASSERT(genChild->isListMarker() || genChild->style()->styleType() == FIRST_LETTER) triggered on flex-box content
2307 https://bugs.webkit.org/show_bug.cgi?id=91003
2309 Reviewed by Abhishek Arya.
2311 Tests: fast/flexbox/assert-generated-deprecated-flexbox.html
2312 fast/flexbox/assert-generated-new-flexbox.html
2314 The issue was that findBeforeAfterParent didn't return the right parent for the flex-box case. This would
2315 make us update the wrong children (and not propagate the style updates properly).
2317 * rendering/RenderObjectChildList.cpp:
2318 (WebCore::findBeforeAfterParent):
2319 Added a check for flex boxes (both deprecated and new).
2321 2012-07-12 Pravin D <pravind.2k4@gmail.com>
2323 Percentage width replaced element in zero percent/fixed width container block incorrectly rendered.
2324 https://bugs.webkit.org/show_bug.cgi?id=9493
2326 Reviewed by Andy Estes.
2328 When the width of the container is zero percent/fixed value then the width of the replaced element must also be zero.
2330 Test: fast/css/percent-width-img-inside-zero-percent-and-fixed-container.html
2332 * rendering/RenderBox.cpp:
2333 (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
2334 When the containing block's available width is zero there can be two cases.
2335 The containing block is floated/positioned in which case the width of the replaced child element must be its instrinsic width.
2336 On the other hand if the width of the container is specified to be either zero percent or fixed value then the width of the
2337 replaced elment must be zero.
2339 2012-07-11 Ryosuke Niwa <rniwa@webkit.org>
2341 invalidateNodeListsCacheAfterAttributeChanged should dynamically figure out which attribute needs invalidation
2342 https://bugs.webkit.org/show_bug.cgi?id=91046
2344 Reviewed by Anders Carlsson.
2346 Added an array of counters (m_nodeListCounts) for each set of attributes (NodeListInvalidationType) node lists care about
2347 to Document, and made DynamicSubtreeNodeList's constructor and destructor increment and decrement these counters via
2348 registerDynamicSubtreeNodeList and unregisterDynamicSubtreeNodeList respectively. shouldInvalidateDynamicSubtreeNodeList,
2349 which is called by invalidateNodeListsCacheAfterAttributeChanged, then use these counters to determine whether a given
2350 attribute change should result in node list invalidations.
2352 Also removed m_numNodeListCaches from TreeScope because this counter has now become redundant with m_nodeListCounts.
2354 * dom/ChildNodeList.cpp:
2355 (WebCore::ChildNodeList::ChildNodeList): Do not invalidate on attribute changes.
2356 * dom/ClassNodeList.cpp:
2357 (WebCore::ClassNodeList::ClassNodeList): Invalidate on class attribute changes.
2359 (WebCore::Document::Document): Initialize m_nodeListCounts.
2360 (WebCore::Document::~Document): Add assertions to make sure m_listsInvalidatedAtDocument, m_nodeListCounts, and
2361 m_collections are all empty.
2362 (WebCore::Document::registerDynamicSubtreeNodeList): This function is now called for all DynamicSubtreeNodeLists supposed
2363 to just ones rooted at the document in order to increment the counter for each invalidation type.
2364 (WebCore::Document::unregisterDynamicSubtreeNodeList): Ditto.
2365 (WebCore::shouldInvalidateDynamicSubtreeNodeListForType): Checks the attribute name against NodeListInvalidationType.
2366 (WebCore::Document::shouldInvalidateDynamicSubtreeNodeList): Returns true if the given attribute name matches the invalidation
2367 type of the existing DynamicSubtreeNodeLists in the document. If the attribute name is not given (used when children change),
2368 then it checks for the existence of any DynamicSubtreeNodeLists. Conceptually, this function can be written as a list of
2369 "if" statements that checks values in m_nodeListCounts and the attribute name. We use "for" loop and switch statement instead
2370 to share logic and detect future addition of values to NodeListInvalidationType.
2372 (Document): Moved RootType and InvalidationType from DynamicNodeListCacheBase and renamed them to NodeListRootType and
2373 NodeListInvalidationType respectively in order to reduce the possibility of future name collisions. Also the invalidation type
2374 now contains 6 values instead of 2.
2375 * dom/DynamicNodeList.cpp:
2377 * dom/DynamicNodeList.h:
2378 (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
2379 (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
2380 (WebCore::DynamicNodeListCacheBase::rootType): Added.
2381 (WebCore::DynamicNodeListCacheBase::invalidationType): Added.
2382 (DynamicNodeListCacheBase): Uses 3 bits to store invalidation type now that the number of values have increased from 2 to 6.
2383 (WebCore::DynamicNodeList::DynamicNodeList):
2384 (WebCore::DynamicSubtreeNodeList::~DynamicSubtreeNodeList): Call unregisterDynamicSubtreeNodeList.
2385 (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList): Call registerDynamicSubtreeNodeList.
2386 * dom/MicroDataItemList.cpp:
2387 (WebCore::MicroDataItemList::MicroDataItemList): Invalidate on itemscope, itemprop, and itemtype content attribute changes.
2388 * dom/NameNodeList.cpp:
2389 (WebCore::NameNodeList::NameNodeList): Invalidate on name attribute changes.
2391 (WebCore::Node::clearRareData):
2392 (WebCore::Node::invalidateNodeListsCacheAfterAttributeChanged): Replaced the hard coded check list of attributes, by a call
2393 to shouldInvalidateDynamicSubtreeNodeList.
2394 (WebCore::Node::invalidateNodeListsCacheAfterChildrenChanged): Calls shouldInvalidateDynamicSubtreeNodeList.
2395 (WebCore::Node::getElementsByTagName):
2396 (WebCore::Node::getElementsByTagNameNS):
2397 (WebCore::Node::getElementsByName):
2398 (WebCore::Node::getElementsByClassName):
2399 (WebCore::Node::radioNodeList):
2400 (WebCore::NodeRareData::createNodeLists):
2401 * dom/NodeRareData.h:
2402 (WebCore::NodeListsNodeData::adoptTreeScope): Unregister and register node lists in m_tagNodeListCacheNS since all node lists
2403 need to be accounted in m_nodeListCounts.
2404 (WebCore::NodeRareData::ensureNodeLists):
2406 * dom/TagNodeList.cpp:
2407 (WebCore::TagNodeList::TagNodeList): Do not invalidate on any attribute changes.
2408 * dom/TreeScope.cpp:
2409 (WebCore::TreeScope::TreeScope): No longer initializes m_numNodeListCaches since it has been removed.
2411 (TreeScope): Removed m_numNodeListCaches.
2412 * dom/TreeScopeAdopter.cpp:
2413 (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2414 * html/HTMLCollection.h:
2415 (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Just pass in DoNotInvalidateOnAttributeChanges for now since
2416 it's never used in HTMLCollections.
2417 * html/LabelableElement.cpp:
2418 (WebCore::LabelableElement::labels):
2419 * html/LabelsNodeList.cpp:
2420 (WebCore::LabelsNodeList::LabelsNodeList): Invalidate on for content attribute changes.
2421 (WebCore::LabelsNodeList::~LabelsNodeList):
2422 * html/RadioNodeList.cpp:
2423 (WebCore::RadioNodeList::RadioNodeList): Invalidate on id, name, and for content attribute changes.
2424 (WebCore::RadioNodeList::~RadioNodeList):
2426 2012-07-12 Gavin Barraclough <barraclough@apple.com>
2428 Threadsafety issues in WebScriptObject
2429 https://bugs.webkit.org/show_bug.cgi?id=90849
2431 Reviewed by Filip Pizlo & Oliver Hunt.
2433 Updated fix for this bug. Taking the JSC API lock from WebScriptObject::release
2434 may not be safe; better to just guard the JSWrapperCache with its own spinlock.
2436 * bindings/objc/WebScriptObject.mm:
2437 (WebCore::getJSWrapper):
2438 - Added spinlock; also retain/autorelease the returned wrapper - it is unsafe
2439 to wait for the caller to do so, due to a race condition vs release removing
2440 the wrapper from the map.
2441 (WebCore::addJSWrapper):
2442 - Take the spinlock guarding the cache.
2443 (WebCore::removeJSWrapper):
2444 - Take the spinlock guarding the cache.
2445 (WebCore::removeJSWrapperIfRetainCountOne):
2446 - Take the spinlock guarding the cache, remove the wrapper if retainCount is one.
2447 (WebCore::createJSWrapper):
2448 - Remove the API lock; this method no longer needs to retain/autorelease (this is
2449 done by getJSWrapper).
2450 (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2451 - Remove the API lock.
2452 (-[WebScriptObject release]):
2453 - Remove the API lock, retainCount check moved into removeJSWrapperIfRetainCountOne.
2455 2012-07-11 David Hyatt <hyatt@apple.com>
2457 https://bugs.webkit.org/show_bug.cgi?id=91000
2458 REGRESSION (r122244): Overflow elements don't shrink as much as they should.
2460 Reviewed by Simon Fraser.
2462 This is a fix for a a regression from https://bugs.webkit.org/show_bug.cgi?id=90646.
2464 I incorrectly analyzed the issue with Robert Hogan's negative margin patch and fooled myself into putting back
2465 in an incorrect minimum width check from long ago.
2467 What should have happened in the test case I patched is that the overflow element should shrink to 0. The issue
2468 with improving the logical top estimate in the previous patch is it made the clear delta become 0. This in turn
2469 exposed a bug in our clearing algorithm with Robert's changes where you could need a relayout even if you didn't
2470 actually move. This issue only occurs because the floats list is getting changed mid-layout because of negative margins.
2472 The patch changes getClearDelta to call setChildNeedsLayout(true) on children whose widths change even when their
2473 positions do not. In effect this dynamic addition of new floats after you have done a layout on the child already means
2474 that you can need to lay out again despite not actually having to move.
2476 To handle this, the code that does the relayout is now called if the child needs a relayout. This is done even if
2477 the logical top estimate matches the final position.
2479 No new tests required, since the test in fast/block/float is now correctly covering the issue.
2481 * rendering/RenderBlock.cpp:
2482 (WebCore::RenderBlock::layoutBlockChild):
2483 (WebCore::RenderBlock::getClearDelta):
2484 * rendering/RenderBox.cpp:
2485 (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2487 2012-07-12 James Weatherall <wez@chromium.org>
2489 storage tests are flaky (crashing) on windows
2490 https://bugs.webkit.org/show_bug.cgi?id=90469
2492 Reviewed by Kentaro Hara.
2494 Add a missing check that the underlying V8 object reference in a V8 NPObject is valid, and zero the NPObject's rootObject member when disposing it, to ensure that it won't be mistakenly touched after that point.
2496 This patch is intended to resolve flakiness in the storage tests including:
2497 storage/indexeddb/mozilla/indexes.html
2498 storage/indexeddb/mozilla/key-requirements-inline-and-passed.html
2499 storage/websql/multiple-databases-garbage-collection.html
2501 * bindings/v8/NPV8Object.cpp:
2502 (WebCore::disposeUnderlyingV8Object):
2503 Zero the NPObject's underlying rootObject.
2504 (_NPN_EvaluateHelper):
2505 Add check that the underlying V8 object reference is valid.
2507 2012-07-12 No'am Rosenthal <noam.rosenthal@nokia.com>
2509 Move TextureMapperAnimation and texmap/LayerTransform to platform/graphics
2510 https://bugs.webkit.org/show_bug.cgi?id=91111
2512 Reviewed by Kenneth Rohde Christiansen.
2514 TextureMapperAnimation and LayerTransform are not specific to TextureMapper, and we want
2515 to use them for other purposes as well. Moving them to platform/graphics would make that
2518 No new tests, moving files around.
2520 * GNUmakefile.list.am:
2523 * platform/graphics/GraphicsLayerAnimation.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp.
2524 * platform/graphics/GraphicsLayerAnimation.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h.
2525 * platform/graphics/GraphicsLayerTransform.cpp: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.cpp.
2526 * platform/graphics/GraphicsLayerTransform.h: Renamed from Source/WebCore/platform/graphics/texmap/LayerTransform.h.
2527 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2528 (WebCore::GraphicsLayerTextureMapper::addAnimation):
2529 * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2530 (GraphicsLayerTextureMapper):
2531 * platform/graphics/texmap/TextureMapperLayer.h:
2532 (TextureMapperLayer):
2533 (WebCore::TextureMapperLayer::setAnimatedTransform):
2534 (WebCore::TextureMapperLayer::setAnimatedOpacity):
2536 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2538 Web Inspector: Simplify UISourceCode code after moving revisions support inside it.
2539 https://bugs.webkit.org/show_bug.cgi?id=91118
2541 Reviewed by Pavel Feldman.
2543 * inspector/front-end/UISourceCode.js:
2544 (WebInspector.UISourceCode.prototype._setContent):
2545 (WebInspector.UISourceCode.prototype.revertToOriginal):
2546 (WebInspector.UISourceCode.prototype.revertAndClearHistory):
2547 (WebInspector.UISourceCode.prototype.contentChanged):
2548 (WebInspector.UISourceCode.prototype.commitWorkingCopy):
2549 (WebInspector.Revision.prototype.revertToThis):
2551 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2553 Unreviewed. Build fix for r122462.
2555 * platform/qt/MemoryUsageSupportQt.cpp:
2557 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2559 Web Inspector: Remove resources panel edited resources search support.
2560 https://bugs.webkit.org/show_bug.cgi?id=91101
2562 Reviewed by Pavel Feldman.
2564 * inspector/front-end/ResourcesPanel.js:
2565 (WebInspector.ResourcesPanel.prototype.performSearch.callback):
2566 (WebInspector.ResourcesPanel.prototype.performSearch):
2568 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2570 Unreviewed r122460 inspector closure compilation fix follow up.
2572 * inspector/front-end/RevisionHistoryView.js:
2573 (WebInspector.RevisionHistoryView):
2575 2012-07-12 Ilya Tikhonovsky <loislo@chromium.org>
2577 Web Inspector: fix native memory instrumentation code for the bindings instrumentation.
2578 https://bugs.webkit.org/show_bug.cgi?id=91096
2580 The instrumented class has to have instrumentation method which reports class size and type and
2581 the member objects and pointers.
2584 void Node::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
2586 memoryObjectInfo->reportObjectInfo(this, MemoryInstrumentation::DOM); // report object size and type.
2587 TreeShared<Node, ContainerNode>::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2588 ScriptWrappable::reportMemoryUsage(memoryObjectInfo); // call base class instrumentation.
2589 memoryObjectInfo->reportPointer(m_document, MemoryInstrumentation::DOM); // report uninstrumented pointer.
2590 memoryObjectInfo->reportInstrumentedPointer(m_next); // report instrumented pointer.
2591 memoryObjectInfo->reportInstrumentedObject(m_anObject); // report instrumented object.
2594 Reviewed by Pavel Feldman.
2596 Existing tests for native memory instrumentation.
2598 * bindings/v8/DOMDataStore.cpp:
2599 (WebCore::DOMDataStore::reportMemoryUsage):
2600 * bindings/v8/DOMDataStore.h:
2603 * bindings/v8/IntrusiveDOMWrapperMap.h:
2604 (WebCore::ChunkedTable::reportMemoryUsage):
2605 * bindings/v8/ScriptProfiler.cpp:
2606 (WebCore::ScriptProfiler::collectBindingMemoryInfo):
2607 * bindings/v8/V8Binding.cpp:
2608 (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
2609 (WebCore::StringCache::reportMemoryUsage):
2610 * bindings/v8/V8Binding.h:
2613 (V8BindingPerIsolateData):
2614 * bindings/v8/V8DOMMap.h:
2616 (AbstractWeakReferenceMap):
2617 * inspector/InspectorMemoryAgent.cpp:
2620 2012-07-12 Pavel Feldman <pfeldman@chromium.org>
2622 Web Inspector: beautify find bar looks, simplify search update routines.
2623 https://bugs.webkit.org/show_bug.cgi?id=91087
2625 Reviewed by Vsevolod Vlasov.
2627 This change updates the looks to the one on the screenshots and simplifies match count update routines.
2629 * inspector/front-end/SearchController.js:
2630 (WebInspector.SearchController.onMatchesMouseDown):
2631 (WebInspector.SearchController):
2632 (WebInspector.SearchController.prototype.activePanelChanged.performPanelSearch):
2633 (WebInspector.SearchController.prototype.activePanelChanged):
2634 (WebInspector.SearchController.prototype._updateSearchNavigationButtonState):
2635 (WebInspector.SearchController.prototype._updateSearchMatchesCountAndCurrentMatchIndex):
2636 (WebInspector.SearchController.prototype._onKeyDown):
2637 (WebInspector.SearchController.prototype._onInput):
2638 (WebInspector.SearchController.prototype._onNextButtonSearch):
2639 (WebInspector.SearchController.prototype._onPrevButtonSearch):
2640 (WebInspector.SearchController.prototype._performSearch):
2641 * inspector/front-end/inspector.css:
2644 (.toolbar-search-navigation-controls):
2645 (.toolbar-search-navigation):
2646 (.toolbar-search-navigation.enabled:hover):
2647 (.toolbar-search-navigation.enabled, .toolbar-search-navigation.enabled:active):
2649 (.toolbar-search-control):
2650 (.search-results-matches):
2651 (.inspector-footer):
2653 2012-07-12 Joshua Bell <jsbell@chromium.org>
2655 IndexedDB: ASSERT hit calling open from callback in Worker
2656 https://bugs.webkit.org/show_bug.cgi?id=90832
2658 Reviewed by Kentaro Hara.
2660 GroupSettings are used to provide the backing store path in some
2661 ports. Accessing those settings from a Worker was added, but the
2662 access referenced thread startup data that is cleared before the
2663 run loop, so an IDBFactory.open() call executed asynchronously
2664 would dereference a null pointer. Plumb the settings startup
2665 data into the context itself, like all of the other properties.
2667 Test: storage/indexeddb/open-twice-workers.html
2669 * Modules/indexeddb/IDBFactory.cpp:
2670 (WebCore::IDBFactory::open):
2671 * workers/DedicatedWorkerContext.cpp:
2672 (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
2673 * workers/DedicatedWorkerContext.h:
2674 (WebCore::DedicatedWorkerContext::create):
2675 (DedicatedWorkerContext):
2676 * workers/DedicatedWorkerThread.cpp:
2677 (WebCore::DedicatedWorkerThread::createWorkerContext):
2678 * workers/DedicatedWorkerThread.h:
2679 (DedicatedWorkerThread):
2680 * workers/SharedWorkerContext.cpp:
2681 (WebCore::SharedWorkerContext::SharedWorkerContext):
2682 * workers/SharedWorkerContext.h:
2683 (WebCore::SharedWorkerContext::create):
2684 (SharedWorkerContext):
2685 * workers/SharedWorkerThread.cpp:
2686 (WebCore::SharedWorkerThread::createWorkerContext):
2687 * workers/SharedWorkerThread.h:
2688 (SharedWorkerThread):
2689 * workers/WorkerContext.cpp:
2690 (WebCore::WorkerContext::WorkerContext):
2691 * workers/WorkerContext.h:
2692 (WebCore::WorkerContext::groupSettings):
2694 * workers/WorkerThread.cpp:
2695 (WebCore::WorkerThread::workerThread):
2696 * workers/WorkerThread.h:
2699 2012-07-12 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2701 [Qt] Implement MemoryUsageSupport
2702 https://bugs.webkit.org/show_bug.cgi?id=91094
2704 Reviewed by Adam Barth.
2706 Implements Qt versions of the memory-usage functions using the information we have available
2707 from the various memory systems used in WebKit.
2709 Also gets rid of a redundant indirection in V8GCController.
2712 * bindings/v8/V8GCController.cpp:
2713 (WebCore::V8GCController::gcEpilogue):
2714 (WebCore::V8GCController::checkMemoryUsage):
2715 * platform/qt/MemoryUsageSupportQt.cpp: Added.
2716 (WebCore::mallocMemoryUsage):
2717 (WebCore::memoryUsageKB):
2718 (WebCore::actualMemoryUsageKB):
2719 (WebCore::MemoryUsageSupport::memoryUsageMB):
2720 (WebCore::MemoryUsageSupport::actualMemoryUsageMB):
2721 (WebCore::MemoryUsageSupport::lowMemoryUsageMB):
2722 (WebCore::MemoryUsageSupport::highMemoryUsageMB):
2723 (WebCore::MemoryUsageSupport::highUsageDeltaMB):
2724 (WebCore::MemoryUsageSupport::processMemorySizesInBytes):
2725 * platform/qt/PlatformSupport.h:
2728 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2730 Web Inspector: Revision history view should be updated when uiSourceCodes are removed or replaced.
2731 https://bugs.webkit.org/show_bug.cgi?id=91095
2733 Reviewed by Pavel Feldman.
2735 RevisionHistoryView is now reset in WorkspaceReset event handler.
2736 UISourceCodes are now removed from RevisionHistoryView when uiSourceCode is removed or replace.
2738 * inspector/front-end/RevisionHistoryView.js:
2739 (WebInspector.RevisionHistoryView):
2740 (WebInspector.RevisionHistoryView.prototype._clearHistory):
2741 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeRemoved):
2742 (WebInspector.RevisionHistoryView.prototype._uiSourceCodeReplaced):
2743 * inspector/front-end/ScriptsPanel.js:
2744 (WebInspector.ScriptsPanel.prototype._reset):
2746 2012-07-12 Dongwoo Im <dw.im@samsung.com>
2748 InspectorFileSystemAgent.cpp have to include File.h explicitly
2749 https://bugs.webkit.org/show_bug.cgi?id=91078
2751 Reviewed by Vsevolod Vlasov.
2753 Make sure the InspectorFileSystemAgent.cpp include the File.h by including explicitly.
2755 No new tests. Covered by existing tests.
2757 * inspector/InspectorFileSystemAgent.cpp: Include File.h
2759 2012-07-12 Vsevolod Vlasov <vsevik@chromium.org>
2761 Web Inspector: [Regression] Stale revisions should be removed on navigation.
2762 https://bugs.webkit.org/show_bug.cgi?id=91080
2764 Reviewed by Pavel Feldman.
2766 Moved all the code responsible for script mapping resetting to Workspace.
2767 Stale revisions are removed in Workspace._reset now.
2769 * inspector/front-end/ScriptSnippetModel.js:
2770 (WebInspector.ScriptSnippetModel):
2771 * inspector/front-end/StylesPanel.js:
2772 (WebInspector.StylesUISourceCodeProvider):
2773 (WebInspector.StylesUISourceCodeProvider.prototype._populate):
2774 (WebInspector.StylesUISourceCodeProvider.prototype.reset):
2775 * inspector/front-end/UISourceCode.js:
2776 (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
2777 * inspector/front-end/Workspace.js:
2778 (WebInspector.Workspace):
2779 (WebInspector.Workspace.prototype._reset):
2781 2012-07-12 Andreas Kling <kling@webkit.org>
2783 Make ElementAttributeData a variable-sized object to reduce memory use.
2784 <http://webkit.org/b/88240>
2786 Reviewed by Antti "Obi-Wan" Koivisto.
2788 Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
2789 it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
2790 For elements that never have their attribute list mutated (the vast majority), this saves a lot of
2791 memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
2793 Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
2794 that nothing tries to mutate an element with a raw attribute array.
2796 When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
2797 a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
2799 This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
2800 That is a ~35% reduction in DOM attribute memory use.
2802 Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
2803 adding of "class" attributes. For more static pages, savings are even greater.
2805 Also did away with ElementAttributeData::removeAttribute(name) and do separate index lookup where
2806 needed. Not a big deal but avoids double lookup of attributes when removing them.
2808 * css/PropertySetCSSStyleDeclaration.cpp:
2809 (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2811 Call ensureInlineStyle() on the element so we know we have a StylePropertySet to work with.
2812 May cause the creation (and replacement) of a new underlying StylePropertySet on the Element's
2815 * css/StylePropertySet.cpp:
2816 (WebCore::StylePropertySet::adoptCSSOMWrapperFrom):
2818 Added. Allows switching the underlying StylePropertySet object while retaining CSSOM wrapper
2819 identity (web facing behavior.)
2822 (WebCore::Element::detachAttribute):
2823 (WebCore::Element::removeAttribute):
2824 (WebCore::Element::attributes):
2825 (WebCore::Element::setAttributeInternal):
2826 (WebCore::Element::parserSetAttributes):
2827 (WebCore::Element::hasEquivalentAttributes):
2828 (WebCore::Element::setAttributeNode):
2829 (WebCore::Element::removeAttributeNode):
2830 (WebCore::Element::getAttributeNode):
2831 (WebCore::Element::getAttributeNodeNS):
2832 (WebCore::Element::hasAttribute):
2833 (WebCore::Element::hasAttributeNS):
2834 (WebCore::Element::normalizeAttributes):
2835 (WebCore::Element::cloneAttributesFromElement):
2836 (WebCore::Element::createMutableAttributeData):
2838 (WebCore::Element::attributeData):
2840 (WebCore::Element::updatedAttributeData):
2841 (WebCore::Element::ensureAttributeData):
2842 (WebCore::Element::ensureUpdatedAttributeData):
2843 (WebCore::Element::mutableAttributeData):
2845 * dom/ElementAttributeData.cpp:
2846 (WebCore::ElementAttributeData::createImmutable):
2848 (WebCore::ElementAttributeData::ElementAttributeData):
2849 (WebCore::ElementAttributeData::~ElementAttributeData):
2850 (WebCore::ElementAttributeData::attrIfExists):
2851 (WebCore::ElementAttributeData::ensureAttr):
2852 (WebCore::ElementAttributeData::setAttr):
2853 (WebCore::ElementAttributeData::removeAttr):
2854 (WebCore::ElementAttributeData::ensureInlineStyle):
2855 (WebCore::ElementAttributeData::ensureMutableInlineStyle):
2856 (WebCore::ElementAttributeData::destroyInlineStyle):
2857 (WebCore::ElementAttributeData::addAttribute):
2858 (WebCore::ElementAttributeData::removeAttribute):
2859 (WebCore::ElementAttributeData::isEquivalent):
2860 (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
2861 (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
2862 (WebCore::ElementAttributeData::cloneDataFrom):
2863 (WebCore::ElementAttributeData::clearAttributes):
2864 (WebCore::ElementAttributeData::replaceAttribute):
2865 (WebCore::ElementAttributeData::getAttributeNode):
2866 * dom/ElementAttributeData.h:
2867 (WebCore::ElementAttributeData::create):
2868 (ElementAttributeData):
2869 (WebCore::ElementAttributeData::setClass):
2870 (WebCore::ElementAttributeData::setIdForStyleResolution):
2871 (WebCore::ElementAttributeData::inlineStyle):
2872 (WebCore::ElementAttributeData::setAttributeStyle):
2873 (WebCore::ElementAttributeData::reportMemoryUsage):
2874 (WebCore::ElementAttributeData::isMutable):
2875 (WebCore::ElementAttributeData::makeMutable):
2876 (WebCore::ElementAttributeData::length):
2878 (WebCore::ElementAttributeData::isEmpty):
2879 (WebCore::ElementAttributeData::array):
2880 (WebCore::ElementAttributeData::removeAttribute):
2881 (WebCore::ElementAttributeData::getAttributeItem):
2882 (WebCore::ElementAttributeData::getAttributeItemIndex):
2883 (WebCore::ElementAttributeData::attributeItem):
2884 * dom/StyledElement.cpp:
2885 (WebCore::StyledElement::style):
2886 (WebCore::StyledElement::classAttributeChanged):
2887 (WebCore::StyledElement::setInlineStyleProperty):
2888 (WebCore::StyledElement::removeInlineStyleProperty):
2889 (WebCore::StyledElement::addSubresourceAttributeURLs):
2890 * dom/StyledElement.h:
2891 (WebCore::StyledElement::ensureInlineStyle):
2892 * html/parser/HTMLConstructionSite.cpp:
2893 (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
2894 * xml/parser/XMLDocumentParserQt.cpp:
2895 (WebCore::XMLDocumentParser::XMLDocumentParser):
2897 2012-07-12 Florin Malita <fmalita@chromium.org>
2899 Incorrect handling of chained pending resources in SVGUseElement
2900 https://bugs.webkit.org/show_bug.cgi?id=89686
2902 Reviewed by Nikolas Zimmermann.
2904 Currently SVGUseElement builds the shadow tree when the target first
2905 becomes available. This is normally OK, but if the target itself (or
2906 one of its children) is a <use> element with pending resources, then
2907 the shadow expansion only captures the current state of the tree and
2908 never gets updated when the pending resource becomes available.
2910 In order to support arbitrary <use>-on-<use> constructs, this patch
2911 tracks nested <use> dependencies and rebuilds the dependent trees
2912 whenever the target gets updated.
2915 Tests: svg/custom/use-nested-expected.svg
2916 svg/custom/use-nested.svg
2918 * svg/SVGElement.cpp:
2919 (WebCore::SVGElement::removedFrom): removedFrom needs to be called up the inheritance chain
2920 before invoking removeAllElementReferencesForTarget. Otherwise we could end up finding the
2921 element being removed as a valid target in SVGUseElement::buildInstanceTree because its
2922 InDocument flag is not cleared yet.
2923 * svg/SVGUseElement.cpp:
2924 (WebCore::SVGUseElement::~SVGUseElement):
2925 (WebCore::SVGUseElement::clearResourceReferences):
2926 (WebCore::SVGUseElement::buildPendingResource):
2927 (WebCore::SVGUseElement::buildShadowAndInstanceTree):
2928 (WebCore::SVGUseElement::buildInstanceTree):
2929 * svg/SVGUseElement.h:
2931 Track <use> -> <use> dependencies using SVGDocumentExtensions'
2932 m_elementDependencies framework and ensure dependent trees are rebuilt
2933 when the target itself gets rebuilt.
2935 2012-07-12 MORITA Hajime <morrita@google.com>
2937 Typo: ParentTranversalDetails should be ParentTraversalDetails
2938 https://bugs.webkit.org/show_bug.cgi?id=91059
2940 Reviewed by Andreas Kling.
2942 Did a bare rename from ParentTranversalDetails to ParentTraversalDetails
2944 No new tests, just a rename.
2946 * dom/ComposedShadowTreeWalker.cpp:
2947 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
2948 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseShadowRoot):
2949 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didFindNode):
2950 (WebCore::ComposedShadowTreeWalker::findParent):
2951 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
2952 (WebCore::ComposedShadowTreeWalker::traverseParent):
2953 (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
2954 (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
2955 * dom/ComposedShadowTreeWalker.h:
2956 (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::ParentTraversalDetails):
2957 (ComposedShadowTreeWalker):
2958 * dom/NodeRenderingContext.h:
2959 (NodeRenderingContext):
2961 2012-07-11 Antti Koivisto <antti@apple.com>
2963 Failure to dispatch didFinishLoadForFrame if font load fails synchronously
2964 https://bugs.webkit.org/show_bug.cgi?id=91018
2966 Reviewed by Enrica Casucci.
2968 New font loads may be triggered by layout after the document load is complete but before we have dispatched
2969 didFinishLoading for the frame. If the load fails synchronously we might fail to ever invoke
2970 FrameLoader::checkLoadComplete and so fail to dispatch didFinishLoading.
2972 Make sure this doesn't happen by calling FrameLoader::checkLoadComplete explicitly after triggering font loads.
2974 * css/CSSFontSelector.cpp:
2975 (WebCore::CSSFontSelector::beginLoadTimerFired):
2977 2012-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
2979 Register protocol handler files should be in Modules/protocolhandler
2980 https://bugs.webkit.org/show_bug.cgi?id=90766
2982 Reviewed by Hajime Morita.
2984 The register protocol handler files are now self-contained. This patch is moved to the Modules.
2986 No new tests. Covered by existing tests.
2990 * GNUmakefile.list.am:
2991 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.cpp: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.cpp.
2993 (WebCore::initProtocolHandlerWhitelist):
2994 (WebCore::verifyCustomHandlerURL):
2995 (WebCore::isProtocolWhitelisted):
2996 (WebCore::verifyProtocolHandlerScheme):
2997 (WebCore::NavigatorRegisterProtocolHandler::NavigatorRegisterProtocolHandler):
2998 (WebCore::NavigatorRegisterProtocolHandler::~NavigatorRegisterProtocolHandler):
2999 (WebCore::NavigatorRegisterProtocolHandler::registerProtocolHandler):
3000 (WebCore::customHandlersStateString):
3001 (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered):
3002 (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler):
3003 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.h: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.h.
3005 (NavigatorRegisterProtocolHandler):
3006 * Modules/protocolhandler/NavigatorRegisterProtocolHandler.idl: Renamed from Source/WebCore/page/NavigatorRegisterProtocolHandler.idl.
3008 * WebCore.gyp/WebCore.gyp:
3011 * WebCore.vcproj/WebCore.vcproj:
3012 * WebCore.vcproj/WebCoreCommon.vsprops:
3013 * WebCore.vcproj/copyForwardingHeaders.cmd:
3014 * WebCore.xcodeproj/project.pbxproj:
3016 2012-07-12 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
3018 [BlackBerry] Cannot use digest proxy auth and NTLM auth at the same time
3019 https://bugs.webkit.org/show_bug.cgi?id=91054
3021 Reviewed by George Staikos.
3023 Added an interface function syncProxyCredential() in class
3024 PageClientBlackBerry, which is responsible to notify WebPageClient
3025 to synchronize proxy credential to the chrome process.
3027 Internally reviewed by Jason Liu <jason.liu@torchmobile.com.cn>
3029 No new tests since there's no functional change.
3031 * platform/blackberry/PageClientBlackBerry.h:
3032 * platform/network/blackberry/NetworkJob.cpp:
3033 (WebCore::NetworkJob::storeCredentials): Remember the accepted proxy
3034 credential and notify webpage client to synchronize it.
3036 2012-07-12 Xingnan Wang <xingnan.wang@intel.com>
3038 [IndexedDB] upperOpen set to true in lowerBound()/lowerOpen set to true in upperBound()
3039 https://bugs.webkit.org/show_bug.cgi?id=90867
3041 Reviewed by Tony Chang.
3043 In the latest W3C spec upperOpen/lowerOpen are set to true in lowerBound()/upperBound(), which
3044 we should keep aligned with.
3046 No new tests - updated storage/indexeddb/keyrange.html to match new behavior.
3048 * Modules/indexeddb/IDBKeyRange.cpp:
3049 (WebCore::IDBKeyRange::lowerBound):
3050 (WebCore::IDBKeyRange::upperBound):
3052 2012-07-12 MORITA Hajime <morrita@google.com>
3054 [Shadow DOM] <video> with <shadow> crashes
3055 https://bugs.webkit.org/show_bug.cgi?id=91055
3057 Reviewed by Kent Tamura.
3059 This is similar to Bug 90480, where an undesired renderer is created by
3060 locating an insertion point on the shadow boundary.
3062 This change adds a guard for such case by cheking whether the
3063 source node of each to-be-created renderer comes from the UA shadow
3064 tree, which is allowed to have a renderer.
3066 Test: fast/dom/shadow/insertion-point-video-crash.html
3068 * html/HTMLMediaElement.cpp:
3069 (WebCore::HTMLMediaElement::childShouldCreateRenderer): Added a check.
3070 (WebCore::HTMLMediaElement::mediaControls): Added const.
3071 (WebCore::HTMLMediaElement::hasMediaControls): Added const.
3072 * html/HTMLMediaElement.h:
3075 2012-07-12 Yoshifumi Inoue <yosin@chromium.org>
3077 REGRESSION(r122184): LocaleMac::currentLocale should use current locale rather than newly create locale object.
3078 https://bugs.webkit.org/show_bug.cgi?id=91057
3080 Reviewed by Kent Tamura.
3082 This patch changes NSLocale object of LocaleMac::m_locale variable to
3083 current NSLocale object rather than newly created NSLocale object from
3086 No new tests. We don't have way to change system preferences from
3087 test scripts and restoring them. To test this patch, we need to do so.
3089 * platform/text/mac/LocaleMac.h:
3090 (LocaleMac): Added a constructor which takes NSLocale object.
3091 * platform/text/mac/LocaleMac.mm:
3092 (WebCore::LocaleMac::LocaleMac): Added a constructor which takes NSLocale object.
3093 (WebCore::LocaleMac::currentLocale): Changed to construct LocaleMac object from NSLocale object rather than locale identifier.
3095 2012-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
3097 [GTK] Add webkit_cookie_manager_set_persistent_storage() to WebKit2 GTK+ API
3098 https://bugs.webkit.org/show_bug.cgi?id=83016
3100 Reviewed by Martin Robinson.
3102 * platform/network/soup/CookieStorageSoup.cpp:
3103 (WebCore::soupCookiesChanged): Do not notify about changes in
3104 other cookie jars than the current one.
3106 2012-07-12 Philip Rogers <pdr@google.com>
3108 Refactor RenderSVGShape bounding box code
3109 https://bugs.webkit.org/show_bug.cgi?id=90655
3111 Reviewed by Nikolas Zimmermann.
3113 RenderSVGShape::objectBoundingBox worked differently than RenderSVGShape::strokeBoundingBox by
3114 not caching the object bounding box and instead computing it on each call. For consistency and
3115 performance objectBoundingBox has been refactored to return a cached value.
3117 createShape has been renamed updateShapeFromElement for understandability. updateShapeFromElement
3118 now updates the internal state of the shape (bounding boxes, etc) from the associated element.
3119 RenderSVGShape::inflateWithStrokeAndMarkerBounds has been merged into
3120 RenderSVGShape::calculateStrokeBoundingBox which is called from updateShapeFromElement.
3122 After this change all bounding box computation is now handled in updateShapeFromElement. Because
3123 subclasses override updateShapeFromElement it will be easy for them to have custom bounding box
3124 code there (as will happen for RenderSVGPath in a followup patch).
3126 strokeBoundingBox and objectBoundingBox are now able to return their cached values immediately
3127 in RenderSVGRect and RenderSVGEllipse instead of checking their fallback state on each call.
3129 Additionally, to save space RenderSVGEllipse and RenderSVGRect now use the m_fillBoundingBox and
3130 m_strokeBoundingBox of RenderSVGShape instead of having their own.
3132 This patch also removes setStrokeAndMarkerBoundingBox that was previously dead code.
3134 No new tests, just a refactoring.
3136 * rendering/svg/RenderSVGEllipse.cpp:
3137 (WebCore::RenderSVGEllipse::updateShapeFromElement):
3139 (WebCore::RenderSVGEllipse::fillShape):
3140 (WebCore::RenderSVGEllipse::strokeShape):
3141 (WebCore::RenderSVGEllipse::shapeDependentStrokeContains):
3142 * rendering/svg/RenderSVGEllipse.h:
3144 (WebCore::RenderSVGEllipse::isEmpty):
3145 * rendering/svg/RenderSVGRect.cpp:
3146 (WebCore::RenderSVGRect::updateShapeFromElement):
3148 (WebCore::RenderSVGRect::fillShape):
3149 (WebCore::RenderSVGRect::strokeShape):
3150 (WebCore::RenderSVGRect::shapeDependentStrokeContains):
3151 (WebCore::RenderSVGRect::shapeDependentFillContains):
3152 * rendering/svg/RenderSVGRect.h:
3154 (WebCore::RenderSVGRect::isEmpty):
3155 * rendering/svg/RenderSVGShape.cpp:
3156 (WebCore::RenderSVGShape::updateShapeFromElement):
3158 (WebCore::RenderSVGShape::layout):
3159 (WebCore::RenderSVGShape::calculateObjectBoundingBox):
3160 (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
3161 (WebCore::RenderSVGShape::updateRepaintBoundingBox):
3162 * rendering/svg/RenderSVGShape.h:
3164 (WebCore::RenderSVGShape::objectBoundingBox):
3165 (WebCore::RenderSVGShape::strokeBoundingBox):
3167 2012-07-12 Kent Tamura <tkent@chromium.org>
3169 Do not save the form state signature if nothing is saved
3170 https://bugs.webkit.org/show_bug.cgi?id=91050
3172 Reviewed by Hajime Morita.
3174 This change will reduce the size of HistoyItem.
3176 Test: fast/forms/state-restore-empty-state.html
3178 * html/FormController.cpp:
3179 (WebCore::FormController::formElementsState):
3180 If stateVector has only the signature string, clear it.
3182 2012-07-11 Mark Rowe <mrowe@apple.com>
3184 <http://webkit.org/b/91051> Fix the Qt Mac build after r122400.
3186 Qt on Mac builds with a deployment target of OS X 10.5. However, it was not been setting
3187 BUILDING_ON_LEOPARD / TARGETING_LEOPARD and thus was falling down code paths in DisplaySleepDisabler.cpp
3188 that were specific to Snow Leopard and newer. After the removal of BUILDING_ON_LEOPARD
3189 and TARGETING_LEOPARD it ended up falling down the correct Leopard-compatible code path,
3190 which revealed that the code made assumptions about which headers had already been included.
3192 * platform/mac/DisplaySleepDisabler.cpp: Include CoreServices/CoreServices.h to pull in
3193 a declaration of UpdateSystemActivity when targeting Leopard.
3195 2012-07-11 Matt Falkenhagen <falken@chromium.org>
3197 Add dialog element feature toggle to InternalSettings
3198 https://bugs.webkit.org/show_bug.cgi?id=90934
3200 Reviewed by Hajime Morita.
3202 This enables layout tests to be written for dialog although the feature is disabled by default.
3204 Tests: fast/dom/HTMLDialogElement/dialog-disabled.html
3205 fast/dom/HTMLDialogElement/dialog-enabled.html
3207 * WebCore.exp.in: Added newly exported symbol.
3208 * testing/InternalSettings.cpp:
3209 (WebCore::InternalSettings::Backup::Backup): Backup dialog feature flag.
3210 (WebCore::InternalSettings::Backup::restoreTo): Restore dialog feature flag.
3211 (WebCore::InternalSettings::setDialogElementEnabled): Added.
3213 * testing/InternalSettings.h: Added support for dialog.
3216 * testing/InternalSettings.idl: Added support for dialog.
3218 2012-07-11 Kent Tamura <tkent@chromium.org>
3220 Accessing width or height of a detached image input element causes crash
3221 https://bugs.webkit.org/show_bug.cgi?id=90885
3223 Reviewed by Kentaro Hara.
3225 Test: fast/forms/image/width-and-height-of-detached-input.html
3227 * html/ImageInputType.cpp:
3228 (WebCore::ImageInputType::height): Add null check for m_imageLoader.
3229 (WebCore::ImageInputType::width): ditto.
3231 2012-07-11 Kent Tamura <tkent@chromium.org>
3233 Do not save state of stateless form controls
3234 https://bugs.webkit.org/show_bug.cgi?id=90964
3236 Reviewed by Hajime Morita.
3238 By Bug 89409, we started to store unmodified form control
3239 state. However we don't need to make such state for the following
3247 Test: fast/forms/state-restore-skip-stateless.html
3249 * html/BaseButtonInputType.cpp:
3250 (WebCore::BaseButtonInputType::shouldSaveAndRestoreFormControlState):
3251 Added. Disable saving state for submit, reset, and button types.
3252 * html/BaseButtonInputType.h:
3253 (BaseButtonInputType): Add shouldSaveAndRestoreFormControlState.
3254 * html/HTMLFormControlElementWithState.h:
3255 (HTMLFormControlElementWithState): Make shouldSaveAndRestoreFormControlState virtual.
3256 * html/HTMLInputElement.cpp:
3257 (WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState):
3258 Added. Checks InputType::shouldSaveAndRestoreFormControlState first.
3259 * html/HTMLInputElement.h:
3260 (HTMLInputElement): Override shouldSaveAndRestoreFormControlState.
3261 * html/HTMLKeygenElement.cpp:
3262 (WebCore::HTMLKeygenElement::shouldSaveAndRestoreFormControlState)
3263 Added. Disable saving state for <keygen>.:
3264 * html/HTMLKeygenElement.h: Override shouldSaveAndRestoreFormControlState.
3265 * html/InputType.cpp:
3266 (WebCore::InputType::shouldSaveAndRestoreFormControlState):
3267 Added. Enable saving state for all types by default.
3269 (InputType): Add shouldSaveAndRestoreFormControlState.
3270 * html/PasswordInputType.cpp:
3271 (WebCore::PasswordInputType::shouldSaveAndRestoreFormControlState):
3272 Added. Disabled saving state.
3273 (WebCore::PasswordInputType::saveFormControlState):
3274 Because shouldSaveAndRestoreFormControlState() returns false,
3275 saveFormControlState should be never called.
3276 * html/PasswordInputType.h:
3277 (PasswordInputType): Override shouldSaveAndRestoreFormControlState.
3279 2012-07-11 No'am Rosenthal <noam.rosenthal@nokia.com>
3281 Compilation error with GLES2 when using gl2ext.h from ANGLE.
3282 https://bugs.webkit.org/show_bug.cgi?id=91030
3284 Reviewed by Kenneth Russell.
3286 gl2ext.h defines PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG and not
3287 PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC. This is a bug in the original Khronos header,
3288 but we should work around it until fixed headers are integrated.
3291 * platform/graphics/opengl/Extensions3DOpenGLES.h:
3292 (Extensions3DOpenGLES):
3293 Removed the "PROC" suffix to work around the header bug.
3295 2012-07-11 Mark Rowe <mrowe@apple.com>
3297 Attempt to fix the Chromium Mac build after r122400.
3299 * platform/text/cf/HyphenationCF.cpp: Ensure that Chromium only compiles the body of this file if
3300 building for a new enough version of OS X.
3302 2012-07-11 Kent Tamura <tkent@chromium.org>
3304 [Mac] Sort project.pbxproj
3306 * WebCore.xcodeproj/project.pbxproj: Apply Tools/Scripts/sort-Xcode-project-file
3308 2012-07-11 Dan Bernstein <mitz@apple.com>
3310 When a table row height grows because of pagination, not all cells’ heights are adjusted
3311 https://bugs.webkit.org/show_bug.cgi?id=91043
3313 Reviewed by Sam Weinig.
3315 The fix for in bug <http://webkit.org/b/83595> in <http://trac.webkit.org/r113738> made table
3316 rows grow as necessary to fit cells that grow as a result of pagination. But it had two bad
3317 side effects: earlier cells on the row would not grow by the same amount, and later cells on
3318 the row would factor the existing growth into their intrinsic padding.
3320 Test: fast/multicol/table-row-height-increase.html
3322 * rendering/RenderTableSection.cpp:
3323 (WebCore::RenderTableSection::layoutRows): Now when a cell becomes taller than the row height,
3324 the additional height needed is recorded, and the cell is shrunk back to row height. Then
3325 after finishing the row, all cells occurring on the row (including cells spanning it but not
3326 starting on it) are grown by the same amount.
3328 2012-07-11 Mark Rowe <mrowe@apple.com>
3330 <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
3332 Reviewed by Dan Bernstein.
3334 The deployment target is already set to the version that we're targeting, and it's that setting
3335 which determines which functionality from the SDK is available to us.
3337 * Configurations/Base.xcconfig:
3339 2012-07-11 Mark Rowe <mrowe@apple.com>
3341 Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
3343 Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3345 Reviewed by Filip Pizlo.
3347 * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
3348 * platform/mac/EmptyProtocolDefinitions.h: The SDK we're building against determines whether the protocols are declared.
3349 * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
3351 * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
3353 2012-07-11 Mark Rowe <mrowe@apple.com>
3355 <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
3357 This removal was handled by a script that translates the relevant macros in to the equivalent checks
3358 using the system availability macros.
3360 Reviewed by Filip Pizlo.
3363 * accessibility/AccessibilityList.h:
3364 * accessibility/AccessibilityTable.h:
3365 * accessibility/mac/AXObjectCacheMac.mm:
3366 * editing/mac/EditorMac.mm:
3367 * loader/MainResourceLoader.cpp:
3368 * loader/MainResourceLoader.h:
3369 * page/AlternativeTextClient.h:
3370 * page/ContextMenuController.cpp:
3371 * page/mac/SettingsMac.mm:
3372 * platform/LocalizedStrings.cpp:
3373 * platform/MemoryPressureHandler.cpp:
3374 * platform/audio/mac/AudioBusMac.mm:
3375 * platform/graphics/Gradient.h:
3376 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3377 * platform/graphics/ca/GraphicsLayerCA.cpp:
3378 * platform/graphics/ca/PlatformCALayer.h:
3379 * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3380 * platform/graphics/ca/mac/TileCache.mm:
3381 * platform/graphics/cg/GraphicsContextCG.cpp:
3382 * platform/graphics/cg/ImageBufferCG.cpp:
3383 * platform/graphics/cg/ImageBufferDataCG.cpp:
3384 * platform/graphics/cg/ImageBufferDataCG.h:
3385 * platform/graphics/cg/ImageCG.cpp:
3386 * platform/graphics/cg/ImageSourceCG.cpp:
3387 * platform/graphics/cg/PathCG.cpp:
3388 * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3389 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3390 * platform/graphics/mac/ComplexTextController.cpp:
3391 * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3392 * platform/graphics/mac/FontCacheMac.mm:
3393 * platform/graphics/mac/FontCustomPlatformData.cpp:
3394 * platform/graphics/mac/FontMac.mm:
3395 * platform/graphics/mac/GraphicsContextMac.mm:
3396 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3397 * platform/graphics/mac/SimpleFontDataMac.mm:
3398 * platform/graphics/mac/WebLayer.h: