1 2012-09-24 Tony Chang <tony@chromium.org>
3 Replace 2 uses of updateLogicalHeight with computeLogicalHeight
4 https://bugs.webkit.org/show_bug.cgi?id=97486
6 Reviewed by Ojan Vafai.
8 More work for bug 96804. This is just a refactoring.
10 No new tests, behavior should be the same as before.
12 * rendering/RenderFlowThread.cpp:
13 (WebCore::RenderFlowThread::computeLogicalHeight):
14 * rendering/RenderFlowThread.h:
15 * rendering/RenderMultiColumnFlowThread.cpp:
16 (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
18 * rendering/RenderMultiColumnFlowThread.h:
19 (RenderMultiColumnFlowThread):
21 2012-09-21 Kenneth Russell <kbr@google.com>
23 [V8] ArrayBuffer code should not pass a negative length to SetIndexedPropertiesToExternalArrayData()
24 https://bugs.webkit.org/show_bug.cgi?id=96703
26 Reviewed by Adam Barth.
28 Check length arguments that may be passed to SetIndexedPropertiesToExternalArrayData.
30 No tests because it is not guaranteed that buffers this large can actually be allocated.
32 * bindings/v8/custom/V8ArrayBufferViewCustom.h:
33 (WebCore::wrapArrayBufferView):
34 (WebCore::constructWebGLArrayWithArrayBufferArgument):
35 (WebCore::constructWebGLArray):
37 2012-09-24 Antti Koivisto <antti@apple.com>
39 Split stylesheet related code out from Document
40 https://bugs.webkit.org/show_bug.cgi?id=97353
42 Reviewed by Andreas Kling.
44 Document is big and unwieldy. The code related to tracking active stylesheets can be factored out.
46 The patch moves stylesheet upkeep, collection and invalidation code from Document to a separate
47 DocumentStyleSheetCollection class. There are no functional changes.
49 The usesLinkRules stylesheet feature bit and the related code is removed as no one was using it.
51 * WebCore.xcodeproj/project.pbxproj:
52 * css/SelectorChecker.cpp:
53 (WebCore::SelectorChecker::checkOneSelector):
54 * css/StyleResolver.cpp:
55 (WebCore::StyleResolver::StyleResolver):
56 (WebCore::StyleResolver::Features::Features):
57 (WebCore::StyleResolver::Features::add):
58 (WebCore::StyleResolver::Features::clear):
59 (WebCore::StyleResolver::collectMatchingRulesForList):
60 * css/StyleResolver.h:
61 (WebCore::StyleResolver::usesBeforeAfterRules):
64 (WebCore::Document::Document):
65 (WebCore::Document::~Document):
66 (WebCore::Document::setCompatibilityMode):
67 (WebCore::Document::recalcStyle):
69 (WebCore::Document::createStyleResolver):
70 (WebCore::Document::seamlessParentUpdatedStylesheets):
71 (WebCore::Document::didRemoveAllPendingStylesheet):
72 (WebCore::Document::processHttpEquiv):
73 (WebCore::Document::styleSheets):
74 (WebCore::Document::preferredStylesheetSet):
75 (WebCore::Document::selectedStylesheetSet):
76 (WebCore::Document::setSelectedStylesheetSet):
77 (WebCore::Document::styleResolverChanged):
78 (WebCore::Document::reportMemoryUsage):
79 (WebCore::Document::haveStylesheetsLoaded):
83 (WebCore::Document::styleSheetCollection):
84 (WebCore::Document::hasNodesWithPlaceholderStyle):
85 (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
86 (WebCore::Document::inStyleRecalc):
87 * dom/DocumentStyleSheetCollection.cpp: Added.
89 (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
90 (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
91 (WebCore::DocumentStyleSheetCollection::pageUserSheet):
92 (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
93 (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
94 (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
95 (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
96 (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
97 (WebCore::DocumentStyleSheetCollection::addUserSheet):
98 (WebCore::DocumentStyleSheetCollection::removePendingSheet):
99 (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
100 (WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode):
101 (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
102 (WebCore::DocumentStyleSheetCollection::testAddedStyleSheetRequiresStyleRecalc):
103 (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
104 (WebCore::styleSheetsUseRemUnits):
105 (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
106 (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
107 (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
108 (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
109 * dom/DocumentStyleSheetCollection.h: Added.
111 (DocumentStyleSheetCollection):
112 (WebCore::DocumentStyleSheetCollection::authorStyleSheets):
113 (WebCore::DocumentStyleSheetCollection::documentUserSheets):
114 (WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):
115 (WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName):
116 (WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName):
117 (WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName):
118 (WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName):
119 (WebCore::DocumentStyleSheetCollection::addPendingSheet):
120 (WebCore::DocumentStyleSheetCollection::hasPendingSheets):
121 (WebCore::DocumentStyleSheetCollection::usesSiblingRules):
122 (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride):
123 (WebCore::DocumentStyleSheetCollection::usesFirstLineRules):
124 (WebCore::DocumentStyleSheetCollection::usesFirstLetterRules):
125 (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules):
126 (WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules):
127 (WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride):
128 (WebCore::DocumentStyleSheetCollection::usesRemUnits):
129 (WebCore::DocumentStyleSheetCollection::setUsesRemUnit):
131 (WebCore::Element::recalcStyle):
132 * dom/ProcessingInstruction.cpp:
133 (WebCore::ProcessingInstruction::~ProcessingInstruction):
134 (WebCore::ProcessingInstruction::checkStyleSheet):
135 (WebCore::ProcessingInstruction::sheetLoaded):
136 (WebCore::ProcessingInstruction::insertedInto):
137 (WebCore::ProcessingInstruction::removedFrom):
138 * dom/StyleElement.cpp:
139 (WebCore::StyleElement::insertedIntoDocument):
140 (WebCore::StyleElement::removedFromDocument):
141 (WebCore::StyleElement::clearDocumentData):
142 (WebCore::StyleElement::createSheet):
143 (WebCore::StyleElement::sheetLoaded):
144 (WebCore::StyleElement::startLoadingDynamicSheet):
145 * html/HTMLLinkElement.cpp:
146 (WebCore::HTMLLinkElement::~HTMLLinkElement):
147 (WebCore::HTMLLinkElement::insertedInto):
148 (WebCore::HTMLLinkElement::removedFrom):
149 (WebCore::HTMLLinkElement::addPendingSheet):
150 (WebCore::HTMLLinkElement::removePendingSheet):
151 * html/HTMLQuoteElement.cpp:
152 (WebCore::HTMLQuoteElement::insertedInto):
153 * html/HTMLViewSourceDocument.cpp:
154 (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
155 * mathml/MathMLMathElement.cpp:
156 (WebCore::MathMLMathElement::insertedInto):
158 (WebCore::Page::userStyleSheetLocationChanged):
159 * page/PageGroup.cpp:
160 (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
161 * rendering/RenderBR.cpp:
162 (WebCore::RenderBR::lineHeight):
163 * rendering/RenderBlock.cpp:
164 (WebCore::RenderBlock::styleDidChange):
165 (WebCore::RenderBlock::splitBlocks):
166 (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
167 (WebCore::RenderBlock::lineHeight):
168 (WebCore::RenderBlock::updateFirstLetter):
169 * rendering/RenderInline.cpp:
170 (WebCore::RenderInline::styleDidChange):
171 (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
172 (WebCore::RenderInline::addChildIgnoringContinuation):
173 (WebCore::RenderInline::splitInlines):
174 (WebCore::RenderInline::lineHeight):
175 * rendering/RenderObject.cpp:
176 (WebCore::RenderObject::uncachedFirstLineStyle):
177 (WebCore::RenderObject::firstLineStyleSlowCase):
178 * rendering/RenderObject.h:
179 (WebCore::RenderObject::firstLineStyle):
180 * rendering/RenderObjectChildList.cpp:
181 (WebCore::RenderObjectChildList::updateBeforeAfterContent):
182 * rendering/RenderTableRow.cpp:
183 (WebCore::RenderTableRow::updateBeforeAndAfterContent):
184 * rendering/RootInlineBox.cpp:
185 (WebCore::RootInlineBox::verticalPositionForBox):
187 2012-09-24 Otto Derek Cheung <otcheung@rim.com>
189 [BlackBerry] Reverting implementation for 407 error pages
190 https://bugs.webkit.org/show_bug.cgi?id=97455
192 Reviewed by Rob Buis.
194 Revert "[BlackBerry] Reverting implementation for 407 error pages"
195 This reverts commit fda0a1b6ac40c06c03bb6293b4a7d7353c3ca238.
197 This revert also reverts commit 0cffe01961fb80204138505bcec29a83818efb73
198 due to dependency issues.
200 * PlatformBlackBerry.cmake:
201 * platform/blackberry/AuthenticationChallengeManager.cpp: Removed.
202 * platform/blackberry/AuthenticationChallengeManager.h:
203 * platform/blackberry/PageClientBlackBerry.h:
204 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
205 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
206 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
207 (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
208 (WebCore::MediaPlayerPrivate::notifyChallengeResult):
209 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
210 (MediaPlayerPrivate):
211 * platform/network/blackberry/NetworkJob.cpp:
212 (WebCore::NetworkJob::NetworkJob):
213 (WebCore::NetworkJob::handleNotifyStatusReceived):
214 (WebCore::NetworkJob::notifyAuthReceived):
215 (WebCore::NetworkJob::handleNotifyClose):
216 (WebCore::NetworkJob::sendRequestWithCredentials):
217 (WebCore::NetworkJob::notifyChallengeResult):
218 * platform/network/blackberry/NetworkJob.h:
221 2012-09-24 Chris Rogers <crogers@google.com>
223 [REGRESSION] Layout Test webaudio/biquad-getFrequencyResponse.html is failing
224 https://bugs.webkit.org/show_bug.cgi?id=97439
226 Reviewed by Kenneth Russell.
228 Fixes uninitialized member variable.
230 This should fix flaky failing test: webaudio/biquad-getFrequencyResponse.html
232 * Modules/webaudio/BiquadProcessor.cpp:
233 (WebCore::BiquadProcessor::BiquadProcessor):
235 2012-09-24 Tony Chang <tony@chromium.org>
237 flex-grow should be 1 when omitted from flex shorthand
238 https://bugs.webkit.org/show_bug.cgi?id=97480
240 Reviewed by Ojan Vafai.
242 We were using 0, based on an outdated version of the spec.
244 Tests: css3/flexbox/flex-property-parsing.html
245 css3/flexbox/flex-algorithm.html: New test case.
248 (WebCore::CSSParser::parseFlex):
250 2012-09-24 Benjamin Poulain <benjamin@webkit.org>
252 Add support for query encoding to WTFURL
253 https://bugs.webkit.org/show_bug.cgi?id=97422
255 Reviewed by Adam Barth.
257 Add the Charset conversion on WebCore side.
259 * platform/KURLWTFURL.cpp:
260 (WebCore::KURL::KURL):
262 (WebCore::CharsetConverter::CharsetConverter):
263 * platform/mac/KURLMac.mm:
264 (WebCore::KURL::KURL):
266 2012-09-24 Benjamin Poulain <benjamin@webkit.org>
268 Integrate most of GoogleURL in WTFURL
269 https://bugs.webkit.org/show_bug.cgi?id=97405
271 Reviewed by Adam Barth.
273 Loosen KURLWTFURL to be able to run most tests in Debug.
275 * platform/KURLWTFURL.cpp:
276 (WebCore::KURL::KURL):
277 (WebCore::KURL::hasPort):
278 (WebCore::KURL::user):
279 (WebCore::KURL::pass):
280 (WebCore::KURL::hasPath):
281 (WebCore::KURL::path):
282 (WebCore::KURL::query):
283 (WebCore::KURL::fragmentIdentifier):
284 (WebCore::KURL::fileSystemPath):
286 2012-09-24 Hans Muller <hmuller@adobe.com>
288 [CSS Exclusions] ExclusionShape API should use logical coordinates for input/output
289 https://bugs.webkit.org/show_bug.cgi?id=96156
291 Reviewed by Dirk Schulze.
293 Correct how ExclusionShapes deal with logical coordinates and enable
294 shape-inside exclusion layout for vertical writing-modes.
296 BasicShape's are defined in physical cooordinates, incoming line and box
297 dimensions are logical coordinates, and the ExclusionShape internals assume
298 that lines are aligned with the Y axis. The createExclusionShape() method
299 is responsible for converting the BasicShape to the internal coordinate
300 system when the writing-mode is vertical. Similarly, the getInclude,ExcludedIntervals()
301 methods are responsible for converting their logical line parameters to Y
302 values in the internal coordinate system. The min,maxYForLogicalLine()
303 methods do the conversion, based on the WritingMode the ExclusionShape
304 was created with. The getInclude,ExcludedIntervals() methods return the
305 logical left and right edges of line segments. No transformation is needed for this.
307 The ExclusionShape's internal coordinate system is essentially the
308 "logical" one, except that top/bottom always map to Y, no matter what
309 the writing-mode is. This is just to simplify writing geometrical shape
310 algorithms, notably the complex ones for polygons. The bug report includes a
311 pair of diagrams that clarify how internal coordinates are related to logical
312 and physical coordinates.
314 Test: fast/exclusions/shape-inside/shape-inside-vertical-text.html
316 * rendering/ExclusionRectangle.cpp:
317 (WebCore::ExclusionRectangle::getExcludedIntervals): rename more accurately reflects return value
318 (WebCore::ExclusionRectangle::getIncludedIntervals): rename for consistency with "excluded" version
319 * rendering/ExclusionRectangle.h:
320 * rendering/ExclusionShape.cpp:
322 (WebCore::ExclusionShape::createExclusionShape):
323 * rendering/ExclusionShape.h:
325 (WebCore::LineSegment::LineSegment): relocated from WrapShapeInfo.h
328 (WebCore::ExclusionShape::minYForLogicalLine):
329 (WebCore::ExclusionShape::maxYForLogicalLine):
330 (WebCore::ExclusionShape::internalToLogicalBoundingBox):
331 * rendering/WrapShapeInfo.cpp:
332 (WebCore::WrapShapeInfo::isWrapShapeInfoEnabledForRenderBlock):
333 (WebCore::WrapShapeInfo::computeShapeSize): pass writingMode to createExclusionShape()
334 (WebCore::WrapShapeInfo::computeSegmentsForLine): removed short-circuit for vertical writing-modes
335 * rendering/WrapShapeInfo.h:
338 2012-09-24 Tony Chang <tony@chromium.org>
340 Replace RenderMeter::updateLogicalHeight to RenderMeter::computeLogicalHeight
341 https://bugs.webkit.org/show_bug.cgi?id=97475
343 Reviewed by Ojan Vafai.
345 Using RenderMeter::computeLogicalHeight is part of bug 96804.
346 Also fix some code to be vertical writing mode aware. This doesn't actually cause
347 a behavioral difference because we use percentage heights/widths which don't depend on
348 updateLogicalWidth or computeLogicalHeight. You can still see bugs if you try to set
349 the min-width on a <meter> node in a vertical writing mode.
351 No new tests, no behavioral changes.
353 * rendering/RenderMeter.cpp:
354 (WebCore::RenderMeter::updateLogicalWidth): Make vertical writing mode aware.
355 (WebCore::RenderMeter::computeLogicalHeight): Switch from updateLogicalHeight and make vertical writing mode aware.
356 * rendering/RenderMeter.h:
359 2012-09-24 Dimitri Glazkov <dglazkov@chromium.org>
361 Remove unbaked support for :scope pseudo-class.
362 https://bugs.webkit.org/show_bug.cgi?id=97467
364 Reviewed by Antti Koivisto.
366 It turns out, the Selectors 4 require ":scope" to match contextual reference element set, which would be the root node in querySelector:
367 http://dev.w3.org/csswg/selectors4/#the-scope-pseudo
369 Right now, we simply make ":scope" equivalent to ":root", which is not correct. Let's remove the partial implementation until we have
370 time/energy to fully implement it.
372 No new tests, removing half-baked feature.
374 * css/CSSSelector.cpp:
375 (WebCore::CSSSelector::pseudoId): Removed all mentions of PseudoScope
376 (WebCore::nameToPseudoTypeMap): Ditto.
377 (WebCore::CSSSelector::extractPseudoType): Ditto.
378 * css/CSSSelector.h: Ditto.
379 * css/SelectorChecker.cpp:
380 (WebCore::SelectorChecker::checkOneSelector): Ditto.
382 2012-09-24 Ryosuke Niwa <rniwa@webkit.org>
384 suspend/resumeWidgetHierarchyUpdates should be a RAII object
385 https://bugs.webkit.org/show_bug.cgi?id=96706
387 Reviewed by Simon Fraser.
389 Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope.
391 * WebCore.exp.in: Export new symbols.
392 * dom/ContainerNode.cpp:
393 (WebCore::ContainerNode::removeChild):
394 (WebCore::ContainerNode::removeChildren):
396 (WebCore::Document::recalcStyle):
398 (WebCore::Element::attach):
399 (WebCore::Element::detach):
400 * page/mac/EventHandlerMac.mm:
401 (WebCore::EventHandler::passMouseDownEventToWidget):
402 * rendering/RenderWidget.cpp:
404 (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
405 (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
406 (WebCore::moveWidgetToParentSoon):
407 * rendering/RenderWidget.h:
408 (WidgetHierarchyUpdatesSuspensionScope):
409 (WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope):
410 (WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
411 (WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended):
412 (WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):
416 2012-09-24 Otto Derek Cheung <otcheung@rim.com>
418 [BlackBerry] Reverting implementation for 407 error pages
419 https://bugs.webkit.org/show_bug.cgi?id=97455
421 Reviewed by Rob Buis.
423 Revert "[BlackBerry] Show custom error page when 407 is received"
424 This reverts commit e6d14529428fe47916fcb997528095b8acad2f2b.
426 * platform/network/blackberry/NetworkJob.cpp:
427 (WebCore::NetworkJob::handleNotifyStatusReceived):
428 (WebCore::NetworkJob::notifyAuthReceived):
429 (WebCore::NetworkJob::sendRequestWithCredentials):
431 2012-09-24 Sheriff Bot <webkit.review.bot@gmail.com>
433 Unreviewed, rolling out r129388.
434 http://trac.webkit.org/changeset/129388
435 https://bugs.webkit.org/show_bug.cgi?id=97477
437 Caused an assertion in a WebKit2 unit test (Requested by
441 * loader/FrameLoader.cpp:
442 (WebCore::FrameLoader::didBeginDocument):
443 * loader/SubresourceLoader.cpp:
444 (WebCore::SubresourceLoader::willSendRequest):
445 * loader/cache/CachedImage.cpp:
446 * loader/cache/CachedImage.h:
447 (WebCore::CachedImage::stillNeedsLoad):
449 * loader/cache/CachedResource.cpp:
450 (WebCore::CachedResource::didAddClient):
451 * loader/cache/CachedResource.h:
453 * loader/cache/CachedResourceLoader.cpp:
454 (WebCore::CachedResourceLoader::CachedResourceLoader):
455 (WebCore::CachedResourceLoader::requestImage):
456 (WebCore::CachedResourceLoader::canRequest):
457 (WebCore::CachedResourceLoader::requestResource):
458 (WebCore::CachedResourceLoader::revalidateResource):
459 (WebCore::CachedResourceLoader::loadResource):
460 (WebCore::CachedResourceLoader::determineRevalidationPolicy):
461 (WebCore::CachedResourceLoader::setAutoLoadImages):
462 * loader/cache/CachedResourceLoader.h:
463 (CachedResourceLoader):
465 (WebCore::setLoadsImagesAutomaticallyInAllFrames):
466 (WebCore::Settings::Settings):
467 (WebCore::Settings::setLoadsImagesAutomatically):
468 (WebCore::Settings::loadsImagesAutomaticallyTimerFired):
469 (WebCore::Settings::setImagesEnabled):
472 * testing/InternalSettings.cpp:
473 (WebCore::InternalSettings::Backup::Backup):
474 (WebCore::InternalSettings::Backup::restoreTo):
475 * testing/InternalSettings.h:
478 * testing/InternalSettings.idl:
480 2012-09-24 Erik Arvidsson <arv@chromium.org>
483 https://bugs.webkit.org/show_bug.cgi?id=73885
485 Reviewed by Ojan Vafai.
487 This adds the DOM 4 remove method.
489 http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-childnode-remove
491 The remove method removes the node from its parent if it has a parent.
493 Tests: fast/dom/Comment/remove.html
494 fast/dom/DocumentType/remove.html
495 fast/dom/Element/remove.html
496 fast/dom/Text/remove.html
498 * dom/CharacterData.idl:
499 * dom/DocumentType.idl:
502 (WebCore::Node::remove): The spec says to do nothing if the node has no parent.
503 * html/parser/HTMLTreeBuilder.cpp:
504 (WebCore::HTMLTreeBuilder::processStartTagForInBody): Cleanup.
505 * html/track/TextTrackCue.cpp:
506 (WebCore::TextTrackCue::removeDisplayTree): No need to check parenNode twice.
508 2012-09-24 Tommy Widenflycht <tommyw@google.com>
510 MediaStream API: Fix the incorrectly spelled RTCPeerConnection::onnegotiationneeded callback
511 https://bugs.webkit.org/show_bug.cgi?id=97456
513 Reviewed by Adam Barth.
515 Renamed onnegotationneeded to onnegotiationneeded.
517 Existing test updated.
519 * Modules/mediastream/RTCPeerConnection.cpp:
520 (WebCore::RTCPeerConnection::negotiationNeeded):
521 * Modules/mediastream/RTCPeerConnection.h:
523 * Modules/mediastream/RTCPeerConnection.idl:
527 2012-09-24 Peter Beverloo <peter@chromium.org>
529 Android's mock scrollbars shows up as a difference in layout test results
530 https://bugs.webkit.org/show_bug.cgi?id=96382
532 Reviewed by Adam Barth.
534 Remove the exceptions made for layout tests in Android's scrollbar theme.
535 This will make our actual scrollbars show up in layout test pixel results,
536 bringing the tests closer to what we actually ship.
538 An important difference with other platforms is that scrollbars do not
539 take any width on Android, they're rendered on top of the content. Therefore
540 each test that has a visible scrollbar does not just need a new pixel
541 result, but will also need a new text result. This will be handled as part
542 of a larger rebaselining process.
544 Will be exercised by every layout test that has a scrollbar.
546 * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
547 (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
548 (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
549 (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
550 * platform/chromium/ScrollbarThemeChromiumAndroid.h:
551 (ScrollbarThemeChromiumAndroid):
553 2012-09-24 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
555 [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
556 https://bugs.webkit.org/show_bug.cgi?id=96362
558 Reviewed by Rob Buis.
560 Fix a mistake of the commit 11fdc73c7c74bbd736ed4160248ff59636a01864
561 Trunk has been changed during reviewing that patch.
563 No new tests, this is to correct a build error.
565 * platform/network/blackberry/CredentialBackingStore.cpp:
566 (WebCore::CredentialBackingStore::getProtectionSpace):
568 2012-09-24 Dan Bernstein <mitz@apple.com>
570 Reverted r129176, the fix for <http://webkit.org/b/97269>, because it introduced a
571 discrepancy between line breaking and max width computation.
573 Rubber-stamped by Anders Carlsson.
575 * platform/graphics/mac/ComplexTextController.cpp:
576 (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
578 2012-09-24 Bo Liu <boliu@chromium.org>
580 Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
581 https://bugs.webkit.org/show_bug.cgi?id=97055
583 Reviewed by Adam Barth.
585 Relanding 128780, 128676, 128645. Was reverted in 128914 due to
586 performance regression in Chromium.
588 New changes in addition to previously reverted patches:
590 Refactored CachedResource::requestResource, loadResource, and
591 revalidateResource. Moved CachedResource::load method to end of
592 requestResource so there is one place where load is called for all
595 Added a enum parameter for requestResource and
596 determineRevalidationPolicy so that FrameLoaderClient::allowImage call
597 do not need to be called multiple times.
599 Removed CachedImage::load call in requestImage so it is not called
602 Removed unnecessary Frame.h includes in CachedResource and
605 Removed dead load() method declaration in CachedImage.
607 Updated text expectation for two image-permissions tests to reflect
608 the removed calls to allowImage.
610 Tests: fast/loader/display-image-unset-allows-cached-image-load.html
611 fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html
612 fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html
615 * loader/FrameLoader.cpp:
616 (WebCore::FrameLoader::didBeginDocument):
617 * loader/SubresourceLoader.cpp:
618 (WebCore::SubresourceLoader::willSendRequest):
619 * loader/cache/CachedImage.cpp:
620 * loader/cache/CachedImage.h:
621 * loader/cache/CachedResource.cpp:
622 (WebCore::CachedResource::didAddClient):
623 * loader/cache/CachedResource.h:
625 (WebCore::CachedResource::stillNeedsLoad):
626 * loader/cache/CachedResourceLoader.cpp:
627 (WebCore::CachedResourceLoader::CachedResourceLoader):
628 (WebCore::CachedResourceLoader::requestImage):
629 (WebCore::CachedResourceLoader::canRequest):
630 (WebCore::CachedResourceLoader::requestResource):
631 (WebCore::CachedResourceLoader::revalidateResource):
632 (WebCore::CachedResourceLoader::loadResource):
633 (WebCore::CachedResourceLoader::determineRevalidationPolicy):
634 (WebCore::CachedResourceLoader::setAutoLoadImages):
636 (WebCore::CachedResourceLoader::setImagesEnabled):
637 (WebCore::CachedResourceLoader::clientDefersImage):
638 (WebCore::CachedResourceLoader::shouldDeferImageLoad):
639 (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
640 * loader/cache/CachedResourceLoader.h:
641 (CachedResourceLoader):
643 (WebCore::setImageLoadingSettings):
644 (WebCore::Settings::Settings):
645 (WebCore::Settings::setLoadsImagesAutomatically):
646 (WebCore::Settings::imageLoadingSettingsTimerFired):
647 (WebCore::Settings::setImagesEnabled):
650 * testing/InternalSettings.cpp:
651 (WebCore::InternalSettings::Backup::Backup):
652 (WebCore::InternalSettings::Backup::restoreTo):
653 (WebCore::InternalSettings::setImagesEnabled):
655 * testing/InternalSettings.h:
658 * testing/InternalSettings.idl:
660 2012-09-24 Joone Hur <joone.hur@intel.com>, Gustavo Noronha Silva <gustavo.noronha@collabora.com>
662 [GTK] Implement GraphicsLayer using Clutter
663 https://bugs.webkit.org/show_bug.cgi?id=73767
665 Reviewed by Martin Robinson.
667 This patch is needed for enabling Accelerated Compositing(Clutter backend)
668 with the patches submitted in bug 92045 and 91940.
670 No new tests. This will be covered by pixel tests for Qt/GTK+ accelerated
671 compositing and 3D transforms.
673 * GNUmakefile.list.am:
674 * platform/clutter/GRefPtrClutter.cpp: Removed.
675 * platform/clutter/GRefPtrClutter.h: Removed.
676 * platform/graphics/clutter/PlatformClutterLayerClient.h: Added.
678 (PlatformClutterLayerClient):
679 (WebCore::PlatformClutterLayerClient::~PlatformClutterLayerClient):
680 * platform/graphics/clutter/TransformationMatrixClutter.cpp: Added to convert CoglMatrix to
681 TransformationMatrix.
683 (WebCore::TransformationMatrix::operator CoglMatrix):
684 * platform/graphics/transforms/TransformationMatrix.h:
685 (TransformationMatrix):
687 2012-09-24 David Grogan <dgrogan@chromium.org>
690 https://bugs.webkit.org/show_bug.cgi?id=96548
692 Reviewed by Adam Barth.
694 We are largely compatible with the FF implementation and the w3c test
695 suite submitted by MS. The w3c test suite doesn't yet check
696 for lack of prefix; this is mostly to signal to devs that we think our
697 implementation is stable.
699 This patch uses the new FeatureObserver to get data about prefixed
702 Tests: storage/indexeddb/unprefix-workers.html
703 storage/indexeddb/unprefix.html
705 * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
706 (WebCore::DOMWindowIndexedDatabase::indexedDB):
707 * Modules/indexeddb/DOMWindowIndexedDatabase.h:
708 (DOMWindowIndexedDatabase):
709 * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
710 * Modules/indexeddb/WorkerContextIndexedDatabase.cpp:
711 (WebCore::WorkerContextIndexedDatabase::indexedDB):
712 * Modules/indexeddb/WorkerContextIndexedDatabase.h:
713 (WorkerContextIndexedDatabase):
714 * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
715 * bindings/generic/RuntimeEnabledFeatures.h:
716 Making the auxiliary objects RuntimeEnabled didn't make much sense as
717 they are useless without the factory, so always enable them.
719 (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
720 * bindings/scripts/CodeGeneratorGObject.pm:
722 * page/FeatureObserver.h:
724 2012-09-24 Andrey Adaikin <aandrey@chromium.org>
726 Web Inspector: [WebGL] First step towards 2D canvas instrumentation in injected script
727 https://bugs.webkit.org/show_bug.cgi?id=96746
729 Reviewed by Pavel Feldman.
731 First step towards the 2D canvas instrumentation from the WebGL injected script module side.
732 We trace and save all calls that affect the 2D canvas context state and it's resources (Gradient and Pattern)
733 so that we could replay the context and resources states later.
734 The 2D canvas context state consists of:
735 - current transformation matrix
736 - current default path
737 - current clipping region (affected by the "clip" command)
738 - current values of the context attributes (like strokeStyle, fillStyle, etc.)
739 - a stack of saved drawing states (affected by the "save" and "restore" commands)
741 * inspector/InjectedScriptCanvasModuleSource.js:
744 2012-09-24 Andrey Adaikin <aandrey@chromium.org>
746 Web Inspector: [TextEditor] conditional breakpoint popup not showing up the first time
747 https://bugs.webkit.org/show_bug.cgi?id=97442
749 Reviewed by Pavel Feldman.
751 1) The conditional breakpoint popup may not show up the first time we click on the gutter.
752 This was the case because the popup decoration element would be deleted from the line while
753 it was being highlighted and appended afterwards. Now we do not remove decorations from the
754 DOM while highlighting.
756 2) Also the popup will close itself on any mouse click event, even if it's targeted to the
757 input box itself. This was due to pointer-events: none; CSS style for the parent element.
758 Now we just override this style for the input box.
760 * inspector/front-end/DefaultTextEditor.js:
761 (WebInspector.TextEditorMainPanel.prototype._paintLine):
762 (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
763 (WebInspector.TextEditorMainPanel.prototype._insertTextNodeBefore):
764 * inspector/front-end/inspector.css:
765 (.source-frame-breakpoint-condition):
767 2012-09-24 Andrey Adaikin <aandrey@chromium.org>
769 Web Inspector: [Canvas] set CanvasAgent in InstrumentingAgents upon calling enable command
770 https://bugs.webkit.org/show_bug.cgi?id=97331
772 Reviewed by Yury Semikhatsky.
774 We should set CanvasAgent in InstrumentingAgents from enable() command and remove from disable(), instead of doing this in constructor and destructor.
776 * inspector/InspectorCanvasAgent.cpp:
777 (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
778 (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
779 (WebCore::InspectorCanvasAgent::restore):
780 (WebCore::InspectorCanvasAgent::enable):
781 (WebCore::InspectorCanvasAgent::disable):
782 * inspector/InspectorCanvasAgent.h:
783 (InspectorCanvasAgent):
784 * inspector/InspectorCanvasInstrumentation.h:
785 (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
786 (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
788 2012-09-24 Patrick Gansterer <paroga@webkit.org>
790 Remove remaining WTF_DEPRECATED_STRING_OPERATORS from cpp files
791 https://bugs.webkit.org/show_bug.cgi?id=97412
793 Reviewed by Adam Barth.
795 * css/StylePropertySet.cpp: Removed useless define.
797 2012-09-20 Emil A Eklund <eae@chromium.org>
799 snapToSize rounds the incorrectly for negative locations
800 https://bugs.webkit.org/show_bug.cgi?id=97265
802 Reviewed by Eric Seidel.
804 Change snapSizeToPixel to preserve sign for location which
807 Test: fast/sub-pixel/snap-negative-location.html
809 * platform/FractionalLayoutUnit.h:
810 (WebCore::snapSizeToPixel):
812 2012-09-24 Jonathan Liu <net147@gmail.com>
814 Use unsigned char for bitfield instead of unsigned.
815 https://bugs.webkit.org/show_bug.cgi?id=97447
817 Reviewed by Andreas Kling.
819 Not all compilers will pad an unsigned bitfield to the smallest size.
820 Use unsigned char instead of unsigned to reduce padding for compilers
821 that pad to the underlying type.
823 No new tests. There is already a compile-time assertion.
830 2012-09-24 Peter Rybin <peter.rybin@gmail.com>
832 Web Inspector: don't allow exception in front-end when expanding function scope
833 https://bugs.webkit.org/show_bug.cgi?id=97346
835 Reviewed by Yury Semikhatsky.
837 A missing guard condition is added.
839 * inspector/front-end/ObjectPropertiesSection.js:
840 (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
841 (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
843 2012-09-24 Arvid Nilsson <anilsson@rim.com>
845 [BlackBerry] Add cookie database API
846 https://bugs.webkit.org/show_bug.cgi?id=97102
848 Reviewed by Antonio Gomes.
850 Add a CookieManager method that takes a list of strings to parse
851 instead of just one string. Expose CookieParser::parseOneCookie.
853 Reviewed internally by Otto D. Cheung.
855 No change in behavior, no new tests.
857 * platform/blackberry/CookieManager.cpp:
858 (WebCore::CookieManager::setCookies):
860 * platform/blackberry/CookieManager.h:
861 * platform/blackberry/CookieParser.cpp:
862 (WebCore::CookieParser::parseOneCookie):
864 * platform/blackberry/CookieParser.h:
867 2012-09-24 Vsevolod Vlasov <vsevik@chromium.org>
869 Web Inspector: Open resource dialog has too many false positive matches.
870 https://bugs.webkit.org/show_bug.cgi?id=97332
872 Reviewed by Alexander Pavlov.
874 Improved open resource dialog filtering to make the amount of false
875 positive search results less.
877 * inspector/front-end/FilteredItemSelectionDialog.js:
878 (WebInspector.FilteredItemSelectionDialog.prototype._innerCreateSearchRegExp):
879 (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem.get var):
880 (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem):
882 2012-09-24 Andrey Adaikin <aandrey@chromium.org>
884 Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
885 https://bugs.webkit.org/show_bug.cgi?id=97203
887 Reviewed by Yury Semikhatsky.
889 Implements wrapping a 2D canvas context through the injected canvas module script facility.
891 * bindings/js/JSHTMLCanvasElementCustom.cpp:
892 (WebCore::JSHTMLCanvasElement::getContext):
893 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
894 (WebCore::V8HTMLCanvasElement::getContextCallback):
895 * inspector/InjectedScriptCanvasModule.cpp:
896 (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
898 (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
899 (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
900 * inspector/InjectedScriptCanvasModule.h:
901 (InjectedScriptCanvasModule):
902 * inspector/InspectorCanvasAgent.cpp:
903 (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
905 * inspector/InspectorCanvasAgent.h:
906 (InspectorCanvasAgent):
907 * inspector/InspectorCanvasInstrumentation.h:
908 (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
910 * inspector/InspectorInstrumentation.h:
911 (InspectorInstrumentation):
913 2012-09-24 Pavel Feldman <pfeldman@chromium.org>
915 Web Inspector:EXC_BAD_ACCESS upon closing page with node highlighted
916 https://bugs.webkit.org/show_bug.cgi?id=97446
918 Reviewed by Alexander Pavlov.
920 Added 0 check on frame view.
922 * inspector/InspectorOverlay.cpp:
923 (WebCore::InspectorOverlay::update):
925 2012-09-21 Alexander Pavlov <apavlov@chromium.org>
927 Web Inspector: [REGRESSION] Cmd-Shift-C doesn't enable element inspection mode when inspector hidden
928 https://bugs.webkit.org/show_bug.cgi?id=97249
930 Reviewed by Yury Semikhatsky.
932 Fix regression from r125871.
934 * inspector/front-end/InspectorFrontendAPI.js:
935 (InspectorFrontendAPI.enterInspectElementMode):
936 * inspector/front-end/inspector.js:
937 (WebInspector._createGlobalStatusBarItems):
938 (WebInspector.documentKeyDown):
940 2012-09-24 Alexander Pavlov <apavlov@chromium.org>
942 Web Inspector: Disable persistence of master switches in the "Overrides" settings tab
943 https://bugs.webkit.org/show_bug.cgi?id=97440
945 Reviewed by Yury Semikhatsky.
947 Disables enforcement of device metrics, geolocation, and device orientation overrides on Web Inspector start.
949 * inspector/InspectorPageAgent.cpp:
950 (WebCore::InspectorPageAgent::restore):
951 * inspector/front-end/SettingsScreen.js:
952 (WebInspector.UserAgentSettingsTab.prototype._onMetricsCheckboxClicked):
953 (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
954 (WebInspector.UserAgentSettingsTab.prototype._onDeviceOrientationOverrideCheckboxClicked):
955 * inspector/front-end/UserAgentSupport.js:
956 (WebInspector.UserAgentSupport):
957 (WebInspector.UserAgentSupport.prototype.toggleDeviceMetricsOverride):
958 (WebInspector.UserAgentSupport.prototype.toggleGeolocationPositionOverride):
959 (WebInspector.UserAgentSupport.prototype.toggleDeviceOrientationOverride):
960 * inspector/front-end/externs.js:
962 2012-09-24 Vivek Galatage <vivekgalatage@gmail.com>
964 Web Inspector: implement testing harness for pure protocol tests.
965 https://bugs.webkit.org/show_bug.cgi?id=90675
967 Reviewed by Yury Semikhatsky.
969 Implementing the testing harness as the APIs of Internals object not
970 only reduced platform specific patching of DRTs but also minimized the
971 the effort required to open up the new dummy inspector Frontend.
973 The openDummyInspectorFrontend method will return the handle to newly
974 created DOMWindow. This DOMWindow object can be utilized inside the test
975 case to communicate using postMessage WebAPI.
977 The newly created DOMWindow will host the protocol-test.html which
978 will seed the necessary JS libraries to communicate with the
981 Test: inspector-protocol/css-getSupportedCSSProperties.html
985 * inspector/InspectorClient.h:
987 * testing/Internals.cpp:
988 (InspectorFrontendClientDummy):
989 (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy):
991 (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy):
992 (InspectorFrontendChannelDummy):
993 (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy):
994 (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy):
995 (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
996 (WebCore::Internals::consoleMessageArgumentCounts):
997 (WebCore::Internals::openDummyInspectorFrontend):
998 (WebCore::Internals::closeDummyInspectorFrontend):
999 * testing/Internals.h:
1002 * testing/Internals.idl:
1004 2012-09-24 Keishi Hattori <keishi@webkit.org>
1006 REGRESSION(r127727): Calendar picker focus doesn't loop in calendar-picker.html
1007 https://bugs.webkit.org/show_bug.cgi?id=97183
1009 Reviewed by Kent Tamura.
1011 Fixing bug calendar-picker.html. The page popup behaves fine because
1012 this code is only necessary in calendar-picker.html where the focus can
1013 move outside of the picker because we are just using an iframe.
1015 No new tests. Added tests to calendar-picker-key-operations.html.
1017 * Resources/pagepopups/calendarPicker.js:
1018 (YearMonthController.prototype.attachTo):
1019 (CalendarPicker.prototype._handleBodyKeyDown):
1021 2012-09-24 Andrey Kosyakov <caseq@chromium.org>
1023 Unreviewed follow-up to r129336 -- fixed closure compiler warnings.
1025 * inspector/front-end/HAREntry.js:
1026 * inspector/front-end/TimelineModel.js:
1028 2012-09-24 Andrey Adaikin <aandrey@chromium.org>
1030 Web Inspector: [TextEditor] Line numbers out of sync after closing breakpoint condition editor
1031 https://bugs.webkit.org/show_bug.cgi?id=96510
1033 Reviewed by Vsevolod Vlasov.
1035 Sync line heights on adding/removing decorations.
1037 * inspector/front-end/DefaultTextEditor.js:
1038 (WebInspector.TextEditorGutterChunk):
1039 (WebInspector.TextEditorGutterChunk.prototype.addDecoration):
1040 (WebInspector.TextEditorGutterChunk.prototype.removeDecoration):
1041 (WebInspector.TextEditorGutterChunk.prototype.set expanded):
1042 (WebInspector.TextEditorGutterChunk.prototype.get height):
1043 (WebInspector.TextEditorGutterChunk.prototype._createRow):
1044 (WebInspector.TextEditorMainChunk.prototype.addDecoration):
1045 (WebInspector.TextEditorMainChunk.prototype.removeDecoration):
1046 (WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):
1048 2012-09-21 Andrey Kosyakov <caseq@chromium.org>
1050 Web Inspector: support saving HAR with resources content
1051 https://bugs.webkit.org/show_bug.cgi?id=97341
1053 Reviewed by Vsevolod Vlasov.
1055 - add WebInspector.HARWriter that writes HAR with content to a stream;
1056 - replace Save all as HAR with Save all with Content as HAR in network's panel context menu;
1057 - remove entries for copying/saving of individual request items to reduce clutter in context menu;
1058 - a drive-by fix of an exception when invoking context menu not on a network item;
1060 Test: http/tests/inspector/network/har-content.html
1062 * English.lproj/localizedStrings.js:
1063 * inspector/front-end/FileUtils.js:
1064 * inspector/front-end/HAREntry.js:
1065 (WebInspector.HAREntry.prototype._buildPostData):
1066 (WebInspector.HARLog.prototype.build):
1067 (WebInspector.HARLog.prototype._creator):
1068 (WebInspector.HARWriter):
1069 (WebInspector.HARWriter.prototype.write):
1070 (WebInspector.HARWriter.prototype._onContentAvailable):
1071 (WebInspector.HARWriter.prototype._beginWrite):
1072 (WebInspector.HARWriter.prototype._writeNextChunk):
1073 * inspector/front-end/NetworkPanel.js:
1074 (WebInspector.NetworkLogView.prototype.get statusBarItems):
1075 (WebInspector.NetworkLogView.prototype._createStatusBarItems):
1076 (WebInspector.NetworkLogView.prototype._contextMenu):
1077 (WebInspector.NetworkLogView.prototype._exportAll.openCallback):
1078 (WebInspector.NetworkLogView.prototype._exportAll):
1080 2012-09-24 Nico Weber <thakis@chromium.org>
1082 [chromium] Remove BitLockerSkia. It's apparently not used.
1083 https://bugs.webkit.org/show_bug.cgi?id=97434
1085 Reviewed by Kent Tamura.
1087 * platform/graphics/skia/BitLockerSkia.cpp: Removed.
1088 * platform/graphics/skia/BitLockerSkia.h: Removed.
1090 2012-09-24 Matt Falkenhagen <falken@chromium.org>
1092 Skeleton implementation of dialog.showModal()
1093 https://bugs.webkit.org/show_bug.cgi?id=97425
1095 Reviewed by Kent Tamura.
1097 This adds a basic implementation of showModal(), so it later can be
1098 used to test the top layer, once it is implemented. The main features
1099 of showModal(), modality and the top layer, are not yet implemented.
1101 Test: fast/dom/HTMLDialogElement/dialog-show-modal.html
1103 * html/HTMLDialogElement.cpp:
1104 (WebCore::HTMLDialogElement::showModal): The same as show(), but throws an error in the cases specified in the spec.
1106 * html/HTMLDialogElement.h:
1107 (HTMLDialogElement):
1108 * html/HTMLDialogElement.idl:
1110 2012-09-24 Ryuan Choi <ryuan.choi@samsung.com>
1112 [EFL] Regression after r129328
1113 https://bugs.webkit.org/show_bug.cgi?id=97429
1115 Unreviewed, rolling out r129328.
1117 * platform/efl/RenderThemeEfl.cpp:
1118 (WebCore::RenderTheme::themeForPage):
1120 2012-09-23 Ryuan Choi <ryuan.choi@samsung.com>
1122 [EFL] Duplicated RenderThemeEfl creation for same page
1123 https://bugs.webkit.org/show_bug.cgi?id=88391
1125 Reviewed by Gyuyoung Kim.
1127 Other ports return one or two RenderTheme regardless of page.
1128 But, WebKit/Efl can create different theme for each page and
1129 themeForPage creates new RenderTheme whenever it is called with page.
1130 So more than one RenderTheme can be created for a page.
1132 This patches checks whether page already has RenderTheme not to create new
1133 RenderTheme for same page.
1135 * platform/efl/RenderThemeEfl.cpp:
1136 (WebCore::RenderTheme::themeForPage):
1138 2012-09-23 Keishi Hattori <keishi@webkit.org>
1140 Add suggestionPicker to CalendarPicker
1141 https://bugs.webkit.org/show_bug.cgi?id=97201
1143 Reviewed by Kent Tamura.
1145 This adds the suggestionPicker to CalendarPicker. It is not available yet as a datalist UI but it can be used inside ManualTests/forms/calendar-picker.html.
1147 No new tests. Suggestion Picker can be tested in ManualTests/forms/calendar-picker.html.
1149 * Resources/pagepopups/calendarPicker.js:
1151 (openSuggestionPicker):
1152 * Resources/pagepopups/pickerCommon.js:
1153 (enclosingNodeOrSelfWithClass):
1154 * Resources/pagepopups/suggestionPicker.css: Added.
1156 (.suggestion-list-entry):
1157 (.suggestion-list-entry:focus):
1158 (.suggestion-list-entry:focus .label):
1159 (.suggestion-list-entry .content):
1160 (.suggestion-list-entry .title):
1161 (.suggestion-list-entry .label):
1162 (.measuring-width .suggestion-list-entry .label):
1163 (.suggestion-list .separator):
1164 * Resources/pagepopups/suggestionPicker.js: Added.
1166 (SuggestionPicker.validateConfig):
1167 (SuggestionPicker.prototype.cleanup):
1168 (SuggestionPicker.prototype._setColors): Creates css rules that sets highlight colors.
1169 (SuggestionPicker.prototype._createSuggestionEntryElement): Creates an entry that when selected submits the value.
1170 (SuggestionPicker.prototype._createActionEntryElement): Creates an entry that causes an action. (e.x. "Other...")
1171 (SuggestionPicker.prototype._measureMaxContentWidth): Temporarily left align everything to measure the width.
1172 (SuggestionPicker.prototype._fixWindowSize):
1173 (SuggestionPicker.prototype._layout):
1174 (SuggestionPicker.prototype.selectEntry):
1175 (SuggestionPicker.prototype._handleEntryClick):
1176 (SuggestionPicker.prototype._findFirstVisibleEntry):
1177 (SuggestionPicker.prototype._findLastVisibleEntry):
1178 (SuggestionPicker.prototype._handleBodyKeyDown):
1179 (SuggestionPicker.prototype._handleEntryMouseOver):
1180 (SuggestionPicker.prototype._handleMouseOut):
1181 * WebCore.gyp/WebCore.gyp:
1183 2012-09-23 Andreas Kling <kling@webkit.org>
1185 REGRESSION(r128239): Mutable ElementAttributeData leak their Attribute vectors.
1186 <http://webkit.org/b/97423>
1188 Reviewed by Anders Carlsson.
1190 r128239 added a WTF::deleteOwnedPtr() override for ElementAttributeData*, but ElementAttributeData is
1191 a ref-counted object. Fixed this by overriding deref() instead to call the appropriate subclass destructor.
1193 * dom/ElementAttributeData.h:
1194 (WebCore::ElementAttributeData::deref):
1196 2012-09-23 Byungwoo Lee <bw80.lee@gmail.com>
1198 Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
1199 https://bugs.webkit.org/show_bug.cgi?id=97306
1201 Reviewed by Benjamin Poulain.
1203 Fix build warning about -Wunused-parameter on ImageBufferCairo.cpp,
1204 ImageDecoder.h by using ASSERT_UNUSED() macro.
1206 * platform/graphics/cairo/ImageBufferCairo.cpp:
1207 (WebCore::encodeImage):
1208 * platform/image-decoders/ImageDecoder.h:
1209 (WebCore::ImageDecoder::rgbColorProfile):
1210 (WebCore::ImageDecoder::inputDeviceColorProfile):
1212 2012-09-23 Andreas Kling <kling@webkit.org>
1214 Enable ElementAttributeData sharing for non-HTML elements.
1215 <http://webkit.org/b/97413>
1217 Reviewed by Anders Carlsson.
1219 Use the whole qualified tag name when creating the ElementAttributeData cache key
1220 instead of just the localName(). This allows sharing and caching of attribute data
1221 for non-HTML elements and makes the code a little cleaner.
1224 (WebCore::Element::parserSetAttributes):
1226 Enable the ElementAttributeData sharing path for non-HTML elements.
1228 * dom/ElementAttributeData.h:
1230 Make immutableAttributeArray() public so Document can call it instead of getting
1231 the raw data address from a const_cast'ed attributeItem(0).
1234 (WebCore::ImmutableAttributeDataCacheKey::ImmutableAttributeDataCacheKey):
1235 (WebCore::ImmutableAttributeDataCacheKey::operator!=):
1236 (WebCore::ImmutableAttributeDataCacheKey::hash):
1237 (ImmutableAttributeDataCacheKey):
1238 (WebCore::ImmutableAttributeDataCacheEntry::ImmutableAttributeDataCacheEntry):
1239 (ImmutableAttributeDataCacheEntry):
1240 (WebCore::Document::cachedImmutableAttributeData):
1242 Let the immutable attribute data cache use a QualifiedName/attributes key
1243 instead of the AtomicString/attributes we were using before. We still grab the
1244 existingHash() from the QualifiedName::localName() and use that for the actual
1247 2012-09-23 Mike West <mkwst@chromium.org>
1249 Measure the usage of the "X-WebKit-CSP" header in the hopes of dropping the prefix completely.
1250 https://bugs.webkit.org/show_bug.cgi?id=97408
1252 Reviewed by Adam Barth.
1254 We plan on landing the unprefixed header in webkit.org/b/96765 once the
1255 spec moves to CR. Though we plan to use it for experimentation in the
1256 near future, we'll want to drop the prefixed header completely at some
1257 point in the future. Starting to measure its usage now will give us a
1258 good baseline when we start contemplating that decision.
1260 No new functionality, so no new tests.
1262 * page/ContentSecurityPolicy.cpp:
1263 (WebCore::ContentSecurityPolicy::didReceiveHeader):
1264 * page/FeatureObserver.h:
1266 2012-09-22 Dominic Mazzoni <dmazzoni@google.com>
1268 AX: Layout tests would be easier to write if AccessibilityController could find an element by id
1269 https://bugs.webkit.org/show_bug.cgi?id=97301
1271 Reviewed by Chris Fleizach.
1273 Add a method to get the DOM "id" attribute from an accessible object, only for layout tests.
1275 Makes existing test more cross-platform:
1276 Tests: accessibility/aria-hidden-with-elements.html
1278 * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1279 (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1281 2012-09-22 Thierry Reding <thierry.reding@avionic-design.de>
1283 [GTK] Build is broken with GLib Unicode backend
1284 https://bugs.webkit.org/show_bug.cgi?id=97308.
1286 Reviewed by Carlos Garcia Campos.
1288 The TextBreakIteratorGtk implementation uses ubrk_close() to delete
1289 the iterator. However that function is ICU specific and not declared
1290 when using the GLib backend. Instead the iterator can simply be freed
1291 using the delete operator.
1293 This commit is based on work by Martin Schlemmer who posted a fix for
1296 http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/1210
1300 * platform/text/gtk/TextBreakIteratorGtk.cpp:
1301 (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
1302 Free iterator using delete instead of ubrk_close().
1304 2012-09-21 Ami Fischman <fischman@chromium.org>
1306 HTMLMediaElement isn't garbage collected between document reloads
1307 https://bugs.webkit.org/show_bug.cgi?id=97020
1309 Reviewed by Eric Carlson.
1311 JS-created (as opposed to DOM-created) Audio nodes never got collected, because they
1312 appear to always hasPendingActivity(), because m_playing is never set to false.
1314 Manual test added: ManualTests/audio-freed-during-reload.html
1316 * html/HTMLMediaElement.cpp:
1317 (WebCore::HTMLMediaElement::stop): set m_playing = false; explicitly.
1319 2012-09-21 Simon Fraser <simon.fraser@apple.com>
1321 RenderMarquee causes ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) : WebCore::FloatRect WebCore::RenderGeometryMap::absoluteRect(const WebCore::FloatRect &) const
1322 https://bugs.webkit.org/show_bug.cgi?id=92464
1324 Reviewed by Sam Weinig.
1326 Marquees could cause an updateCompositingLayersAfterScroll() to be called when
1327 we're in the middle of updating layer positions. updateCompositingLayersAfterScroll()
1328 does a full RenderLayer tree walk, but its use of RenderGeomeryMap reveals that
1329 it's using layers whose positions haven't been updated yet.
1331 Fix by avoiding the updateCompositingLayersAfterScroll() if we're in the process
1332 of updating a marquee when updating layer positions. We'll do a compositing update
1335 Tested by fast/events/tabindex-focus-blur-all.html
1337 * rendering/RenderLayer.cpp:
1338 (WebCore::RenderLayer::RenderLayer):
1339 (WebCore::RenderLayer::updateLayerPositions):
1340 (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
1341 (WebCore::RenderLayer::scrollTo):
1342 * rendering/RenderLayer.h:
1345 2012-09-21 Adam Klein <adamk@chromium.org>
1347 Remove bogus assertions from ChildListMutationScope
1348 https://bugs.webkit.org/show_bug.cgi?id=97372
1350 Reviewed by Ryosuke Niwa.
1352 Some asserts (and their accompanying comment) were trying to enforce
1353 proper usage of ChildListMutationScope from WebCore, but in the
1354 presence of MutationEvents they could fail due to arbitrary script
1357 This change gets rid of those asserts and adds tests exercising
1358 the (pre-existing) codepaths for handling these out-of-order cases.
1359 Without this patch, these tests ASSERT in debug builds.
1361 Tests: fast/mutation/added-out-of-order.html
1362 fast/mutation/removed-out-of-order.html
1364 * dom/ChildListMutationScope.cpp:
1365 (WebCore::ChildListMutationAccumulator::childAdded):
1366 (WebCore::ChildListMutationAccumulator::willRemoveChild):
1367 * dom/ChildListMutationScope.h:
1370 2012-09-21 Dan Bernstein <mitz@apple.com>
1372 REGRESSION (r129176): Incorrect line breaking when kerning occurs between a space and the following character
1373 https://bugs.webkit.org/show_bug.cgi?id=97377
1375 Reviewed by Enrica Casucci.
1377 Test: fast/text/kerning-with-TextLayout.html
1379 When kerning is enabled, the last character in a word may have its advance shortened because
1380 of its trailing space. To account for that, words are measured along with the trailing space,
1381 then the width of a space is subtracted from the result. This doesn’t work when the trailing
1382 space itself has its advance shortened due to the character following it, which can happen
1383 when using the TextLayout optimization. However, when the optimization is used, the advance
1384 of the last character of the word is already adjusted for the trailing space, so there is no
1385 need to measure with that space and subtract its advance.
1387 * rendering/RenderBlockLineLayout.cpp:
1388 (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to not use the trailingSpaceWidth
1389 mechanism when TextLayout is being used.
1391 2012-09-21 Adam Klein <adamk@chromium.org>
1393 Simplify and optimize ChildListMutationScope
1394 https://bugs.webkit.org/show_bug.cgi?id=97352
1396 Reviewed by Ryosuke Niwa.
1398 ChildListMutationScope is one of the most complicated bits of
1399 MutationObserver implementation. This patch aims to simplify it for
1400 clarity and improve its performance (mostly by just doing less).
1402 The big change is to remove the MutationAccumulatorRouter class,
1403 replacing it with lifetime-management logic in ChildListMutationAccumulator
1404 ChildListMutationScope is expected to call getOrCreate() in
1405 its constructor, and each scope holds a RefPtr to the accumulator.
1406 When the last scope holding such a RefPtr is destroyed,
1407 ChildListMutationAccumulator's destructor enqueues the accumulated record.
1409 This greatly reduces the number of lines of code, and condenses
1410 two HashMaps into one. It also reduces hash lookups, which now
1411 occur only on scope creation and when the refcount for a given
1412 accumulator reaches 0 (previously, each childAdded and willRemoveChild
1413 call could result in two hash lookups each).
1415 There are some minor changes as well: the ChildListMutationAccumulator::clear()
1416 method is gone, as it was doing more work than necessary;
1417 DEFINE_STATIC_LOCAL is now used instead of hand-rolled static-management
1418 code; ChildListMutationAccumulator::m_lastAdded is no longer a RefPtr, since it
1419 always points at a Node that's already being ref'd by the accumulator.
1420 Also various minor syntactic cleanups.
1422 No new tests, no change in behavior.
1424 * dom/ChildListMutationScope.cpp:
1425 (WebCore::accumulatorMap): Reduced two maps to one, and manage its lifetime with DEFINE_STATIC_LOCAL.
1426 (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator): Remove unnecessary call to clear() (which itself has been removed).
1427 (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator): Enqueue record if not empty at destruction, and have the accumulator
1428 remove itself from the map.
1429 (WebCore::ChildListMutationAccumulator::getOrCreate): Replaces half of MutationAccumulatorRouter's job.
1430 (WebCore::ChildListMutationAccumulator::childAdded): Minor RefPtr usage improvements.
1431 (WebCore::ChildListMutationAccumulator::isRemovedNodeInOrder): Simplify RefPtr syntax.
1432 (WebCore::ChildListMutationAccumulator::willRemoveChild): Minor RefPtr usage improvements.
1433 (WebCore::ChildListMutationAccumulator::enqueueMutationRecord): Replace call to clear() with clearing m_lastAdded,
1434 since it's the only bit not cleared by the MutationRecord creation call. Also remove
1435 isEmpty check and replace with asserts now that it's a private method.
1436 (WebCore::ChildListMutationAccumulator::isEmpty): Added more assertions about emptiness.
1437 * dom/ChildListMutationScope.h:
1439 (ChildListMutationAccumulator): Extract the inner class to make everything easier to read.
1440 (WebCore::ChildListMutationScope::ChildListMutationScope): Store m_accumulator rather than m_target.
1441 (WebCore::ChildListMutationScope::~ChildListMutationScope): ditto
1442 (WebCore::ChildListMutationScope::childAdded): ditto
1443 (WebCore::ChildListMutationScope::willRemoveChild): ditto
1444 (ChildListMutationScope):
1445 * html/HTMLElement.cpp: Remove unused ChildListMutationScope.h #include.
1447 2012-09-21 Chris Rogers <crogers@google.com>
1449 BiquadFilterNode must take audio-rate parameter changes into account
1450 https://bugs.webkit.org/show_bug.cgi?id=97369
1452 Reviewed by Kenneth Russell.
1454 BiquadFilterNode is currently ignoring any timeline or audio-rate changes to its parameters.
1455 We now check if any of its parameters have timeline or audio-rate changes and, if so, take
1456 them into account. Otherwise, we use ordinary parameter smoothing/de-zippering which is
1457 the case when the parameters are adjusted, for example, from a knob or slider in the UI.
1459 * Modules/webaudio/BiquadDSPKernel.cpp:
1460 (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
1461 * Modules/webaudio/BiquadProcessor.cpp:
1462 (WebCore::BiquadProcessor::checkForDirtyCoefficients):
1463 * Modules/webaudio/BiquadProcessor.h:
1464 (WebCore::BiquadProcessor::hasSampleAccurateValues):
1467 2012-09-21 Brandon Jones <bajones@google.com>
1469 Add support for OES_vertex_array_object in chromium
1470 https://bugs.webkit.org/show_bug.cgi?id=96578
1472 Reviewed by Kenneth Russell.
1474 Adding basic reference counting to WebGLBuffer objects to satisfy spec requirements
1475 for the OES_vertex_array_object extension. Added code to allow calls to the
1476 OES_vertex_array_object extension to interface properly with the chromium WebGL
1479 Test: fast/canvas/webgl/oes-vertex-array-object.html
1481 * html/canvas/WebGLRenderingContext.cpp:
1483 (WebCore::WebGLRenderingContext::deleteBuffer):
1484 (WebCore::WebGLRenderingContext::vertexAttribPointer):
1485 * html/canvas/WebGLVertexArrayObjectOES.cpp:
1486 (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer):
1488 * html/canvas/WebGLVertexArrayObjectOES.h:
1489 (WebGLVertexArrayObjectOES):
1490 (WebCore::WebGLVertexArrayObjectOES::getVertexAttribStateSize):
1491 * platform/chromium/support/Extensions3DChromium.cpp:
1492 (WebCore::Extensions3DChromium::createVertexArrayOES):
1493 (WebCore::Extensions3DChromium::deleteVertexArrayOES):
1494 (WebCore::Extensions3DChromium::isVertexArrayOES):
1495 (WebCore::Extensions3DChromium::bindVertexArrayOES):
1497 2012-09-21 Kenichi Ishibashi <bashi@chromium.org>
1499 [Chromium] Use OpenTypeVerticalData on Linux
1500 https://bugs.webkit.org/show_bug.cgi?id=97277
1502 Reviewed by Tony Chang.
1504 Remove HarfBuzz dependency from GlyphPageTreeNodeSkia. Use OpenTypeVerticalData instead.
1506 No new tests. Rebaselined existing tests.
1508 * WebCore.gyp/WebCore.gyp: Added OpenTypeTypes.h and OpenTypeVerticalData.(cpp|h) for linux and android.
1509 * platform/graphics/FontCache.cpp:
1510 Inserted a space between > and > in typedef of FontVerticalDataCache so that making some compilers happy.
1512 * platform/graphics/SimpleFontData.h:
1513 (SimpleFontData): Moved declaration of m_verticalData to avoid compile warnings.
1514 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1516 (WebCore::FontPlatformData::verticalData): Added.
1517 (WebCore::FontPlatformData::openTypeTable): Added.
1518 * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
1521 * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Removed substituteWithVerticalGlyphs().
1522 (WebCore::GlyphPage::fill):
1524 2012-09-21 Jeremy Apthorp <jeremya@chromium.org>
1526 Crash in WebCore::Document::fullScreenChangeDelayTimerFired
1527 https://bugs.webkit.org/show_bug.cgi?id=97367
1529 Reviewed by Abhishek Arya.
1531 The document could be destroyed during the processing of the
1532 fullscreenchange event, if the document was destroyed as a result of
1533 one of the dispatchEvent calls.
1535 This bug isn't reliably reproducible, so no new tests.
1538 (WebCore::Document::fullScreenChangeDelayTimerFired):
1540 2012-09-21 Pratik Solanki <psolanki@apple.com>
1542 No need to pass order file for WebCoreTestSupport build
1543 https://bugs.webkit.org/show_bug.cgi?id=97363
1545 Reviewed by David Kilzer.
1547 No new tests because no functional change.
1549 * Configurations/WebCoreTestSupport.xcconfig:
1551 2012-09-21 Chris Rogers <crogers@google.com>
1553 Add Web Audio support for deprecated/legacy APIs
1554 https://bugs.webkit.org/show_bug.cgi?id=97050
1556 Reviewed by Eric Carlson.
1558 The Web Audio API specification has undergone much review and some small API changes
1559 have been made (mostly naming-related changes). This patch adds an ENABLE_LEGACY_WEB_AUDIO
1560 build option to allow ports to support the old names.
1563 audiobuffersource-playbackrate.html
1564 audiobuffersource.html
1565 note-grain-on-testing.js
1566 oscillator-testing.js
1568 * Configurations/FeatureDefines.xcconfig:
1569 * GNUmakefile.features.am:
1570 * Modules/webaudio/AudioBufferSourceNode.cpp:
1571 (WebCore::AudioBufferSourceNode::startGrain):
1573 (WebCore::AudioBufferSourceNode::noteGrainOn):
1574 * Modules/webaudio/AudioBufferSourceNode.h:
1575 (AudioBufferSourceNode):
1576 * Modules/webaudio/AudioBufferSourceNode.idl:
1577 * Modules/webaudio/AudioScheduledSourceNode.cpp:
1578 (WebCore::AudioScheduledSourceNode::start):
1579 (WebCore::AudioScheduledSourceNode::stop):
1581 (WebCore::AudioScheduledSourceNode::noteOn):
1582 (WebCore::AudioScheduledSourceNode::noteOff):
1583 * Modules/webaudio/AudioScheduledSourceNode.h:
1584 * Modules/webaudio/Oscillator.idl:
1585 * page/FeatureObserver.h:
1587 2012-09-21 Mark Pilgrim <pilgrim@chromium.org>
1589 [Chromium] remove getFontFamilyForCharacters from PlatformSupport
1590 https://bugs.webkit.org/show_bug.cgi?id=96282
1592 Reviewed by Tony Chang.
1594 Migrating away from PlatformSupport. getFontFamilyForCharacters is
1595 moved to FontCache.h and overridden by the two platforms that
1596 need it (Chromium Linux and Blackberry). New files for the overrides.
1597 Part of a larger refactoring series. See tracking bug 82948.
1599 * PlatformBlackBerry.cmake:
1601 * platform/chromium/PlatformSupport.h:
1603 * platform/graphics/FontCache.h:
1606 * platform/graphics/blackberry/FontCacheBlackberry.cpp: Added.
1608 (WebCore::FontCache::getFontFamilyForCharacters):
1609 * platform/graphics/blackberry/skia/PlatformSupport.cpp:
1611 * platform/graphics/blackberry/skia/PlatformSupport.h:
1613 * platform/graphics/chromium/FontCacheAndroid.cpp:
1614 (WebCore::FontCache::getFontDataForCharacters):
1615 * platform/graphics/chromium/FontCacheChromiumLinux.cpp: Added.
1617 (WebCore::FontCache::getFontFamilyForCharacters):
1618 * platform/graphics/skia/FontCacheSkia.cpp:
1619 (WebCore::FontCache::getFontDataForCharacters):
1621 2012-09-21 Chris Fleizach <cfleizach@apple.com>
1623 AX: WebKit exposes incorrect bounds for embedded SVG in HTML
1624 https://bugs.webkit.org/show_bug.cgi?id=96168
1626 Reviewed by Eric Seidel.
1628 Override absoluteFocusRingQuads() for SVG objects because the default
1629 implementation relies on addFocusRingRects(). In addFocusRingRects(), SVG
1630 objects adds local positions for its rects instead of absolute positions.
1632 Test: accessibility/svg-bounds.html
1634 * rendering/RenderObject.h:
1636 * rendering/svg/RenderSVGModelObject.cpp:
1638 (WebCore::RenderSVGModelObject::absoluteFocusRingQuads):
1639 * rendering/svg/RenderSVGModelObject.h:
1640 (RenderSVGModelObject):
1642 2012-09-21 Lianghui Chen <liachen@rim.com>
1644 [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus.
1645 https://bugs.webkit.org/show_bug.cgi?id=97348
1646 Internal PR: 186597.
1648 Internally reviewed by Yong Li, Joe Mason.
1649 Reviewed by Yong Li.
1651 Add a singleton AuthenticationChallengeManager to manage authentication
1652 challenge dialog. It does following things:
1653 Record page creation/deletion, so it knows what page is present or not.
1654 Record page visibility change so it knows when to display a dialog or not.
1655 Accept authentication challenge, and decide whether to postpone the
1656 challenge dialog based on whether there is active authentication challenge
1657 dialog already and whether its page is visible or not.
1658 When a challenge result comes back, notify the result to all clients
1659 authenticating for the same protection space, and then start the next
1660 authentication challenge from the same page, if there is one.
1661 When a page becomes visible, start the first authentication challenge
1662 dialog that has been blocked before.
1664 And to support this new AuthenticationChallengeManager, and making the
1665 challenge really asynchronous, NetworkJob has been updated to support
1666 the concept of "freeze", which means buffering all network loading status
1667 change but don't send them to NetworkJob clients.
1668 This is necessary when authentication challenge is asynchronous, as the
1669 previous network loading status will likely come before user make any
1672 No new tests for platform specific internal change.
1674 * PlatformBlackBerry.cmake:
1675 * platform/blackberry/AuthenticationChallengeManager.cpp: Added.
1678 (WebCore::ChallengeInfo::ChallengeInfo):
1679 (AuthenticationChallengeManagerPrivate):
1680 (WebCore::AuthenticationChallengeManagerPrivate::AuthenticationChallengeManagerPrivate):
1681 (WebCore::AuthenticationChallengeManagerPrivate::resumeAuthenticationChallenge):
1682 (WebCore::AuthenticationChallengeManagerPrivate::startAuthenticationChallenge):
1683 (WebCore::AuthenticationChallengeManagerPrivate::pageExists):
1684 (WebCore::AuthenticationChallengeManager::AuthenticationChallengeManager):
1685 (WebCore::AuthenticationChallengeManager::pageCreated):
1686 (WebCore::AuthenticationChallengeManager::pageDeleted):
1687 (WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
1688 (WebCore::AuthenticationChallengeManager::authenticationChallenge):
1689 (WebCore::AuthenticationChallengeManager::cancelAuthenticationChallenge):
1690 (WebCore::AuthenticationChallengeManager::notifyChallengeResult):
1691 (WebCore::AuthenticationChallengeManager::instance):
1692 (WebCore::AuthenticationChallengeManager::init):
1693 * platform/blackberry/AuthenticationChallengeManager.h:
1695 (AuthenticationChallengeManager):
1696 * platform/blackberry/PageClientBlackBerry.h:
1697 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1698 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
1699 (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
1700 (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
1701 (WebCore::MediaPlayerPrivate::notifyChallengeResult):
1702 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1703 (MediaPlayerPrivate):
1704 * platform/network/blackberry/NetworkJob.cpp:
1705 (WebCore::NetworkJob::NetworkJob):
1706 (WebCore::NetworkJob::~NetworkJob):
1708 (WebCore::NetworkJob::handleNotifyStatusReceived):
1709 (WebCore::NetworkJob::handleNotifyClose):
1710 (WebCore::NetworkJob::sendRequestWithCredentials):
1711 (WebCore::NetworkJob::notifyChallengeResult):
1712 * platform/network/blackberry/NetworkJob.h:
1715 2012-09-21 Simon Hausmann <simon.hausmann@digia.com>
1717 Unreviewed, rolling out r129248.
1718 http://trac.webkit.org/changeset/129248
1719 https://bugs.webkit.org/show_bug.cgi?id=96000
1724 * WebCore.vcproj/WebCore.vcproj:
1725 * rendering/RenderingAllInOne.cpp:
1727 2012-09-21 Simon Hausmann <simon.hausmann@nokia.com>
1729 Make RenderingAllInOne.cpp usable for ports other than Apple/Win
1730 https://bugs.webkit.org/show_bug.cgi?id=96000
1732 Reviewed by Ryosuke Niwa.
1734 RenderingAllInOne.cpp unconditionally includes RenderThemeWin. This patch separates
1735 it out from the file.
1737 * Target.pri: Add RenderingAllInOne.cpp to the list of supported all-in-one files.
1738 * WebCore.vcproj/WebCore.vcproj: Compile RenderThemeWin.cpp separately.
1739 * rendering/RenderingAllInOne.cpp: Don't include RenderThemeWin.cpp here.
1741 2012-09-21 Joanmarie Diggs <jdiggs@igalia.com>
1743 REGRESSION (r127882): accessibility/spinbutton-value.html failing on GTK
1744 https://bugs.webkit.org/show_bug.cgi?id=96196
1746 Reviewed by Martin Robinson.
1748 The "regression" is that a new test was added but the support was missing
1749 in the Gtk port for spin buttons.
1751 No new tests. Instead the new test which had been skipped was unskipped
1752 as part of this fix.
1754 * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
1755 (atkRole): Map SpinButtonRole to ATK_ROLE_SPIN_BUTTON
1756 (getInterfaceMaskFromObject): Add SpinButtonRole to the roles implementing
1757 the AtkValue interface.
1759 2012-09-21 Joanmarie Diggs <jdiggs@igalia.com>
1761 [GTK] [Stable] Infinite recursion in WebCore::AXObjectCache::getOrCreate
1762 https://bugs.webkit.org/show_bug.cgi?id=96932
1764 Reviewed by Martin Robinson.
1766 Make the decision based on RenderObjects rather than AccessibilityObjects
1767 to avoid the infinite recursion which occurs when remapAriaRoleDueToParent
1770 Test: platform/gtk/accessibility/remapped-aria-crash.html
1772 * accessibility/gtk/AccessibilityObjectAtk.cpp:
1773 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
1775 2012-09-21 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
1777 [BlackBerry] HTML5 media does not handle SSL certificate failures
1778 https://bugs.webkit.org/show_bug.cgi?id=93324
1780 Reviewed by Eric Carlson.
1783 Passed FrameLoaderClientBlackBerry's playerId to MMRPlayer::load()
1784 because MMRPlayer::load() added playerId as a new parameter, which
1785 is required to initiate a MediaSSLHandlerStream to deal with
1786 certificate failure when loading a "https" media url.
1788 Internally reviewed by Joe Mason <jmason@rim.com>.
1790 No new tests since there's no functional change.
1792 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1793 (WebCore::MediaPlayerPrivate::load):
1795 2012-09-21 Evan Wallace <evan.exe@gmail.com>
1797 [WebSocket] Receiving a large message is really slow
1798 https://bugs.webkit.org/show_bug.cgi?id=97237
1800 Reviewed by Alexey Proskuryakov.
1802 WebSocketChannel always reallocates its internal buffer when it receives
1803 and appends new data which causes dramatic slowdowns for messages over
1804 2 MB in size. This patch changes the internal buffer of WebSocketChannel
1805 from a raw char array to a Vector<char> and uses its amortized append()
1806 method. This brings the time to receive a 5 MB message from 5.2 seconds
1809 This patch is only for optimization. No new tests are needed.
1811 * Modules/websockets/WebSocketChannel.cpp:
1812 (WebCore::WebSocketChannel::WebSocketChannel):
1813 (WebCore::WebSocketChannel::~WebSocketChannel):
1814 (WebCore::WebSocketChannel::fail):
1815 (WebCore::WebSocketChannel::resume):
1816 (WebCore::WebSocketChannel::didReceiveSocketStreamData):
1817 (WebCore::WebSocketChannel::appendToBuffer):
1818 (WebCore::WebSocketChannel::skipBuffer):
1819 (WebCore::WebSocketChannel::processBuffer):
1820 (WebCore::WebSocketChannel::resumeTimerFired):
1821 (WebCore::WebSocketChannel::processFrame):
1822 * Modules/websockets/WebSocketChannel.h:
1824 2012-09-21 Andrey Adaikin <aandrey@chromium.org>
1826 Fix build with ENABLE_WEBGL=false
1827 https://bugs.webkit.org/show_bug.cgi?id=97309
1829 Reviewed by Eric Seidel.
1831 WebKit no longer builds when WEBGL is not enabled.
1833 * rendering/FilterEffectRenderer.h:
1834 (FilterEffectRenderer):
1836 2012-09-21 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
1838 [BlackBerry] Media player won't resize for the following source when first source fail to load
1839 https://bugs.webkit.org/show_bug.cgi?id=97342
1841 Reviewed by Yong Li.
1843 As platformPlayer will notify MediaPlayerPrivate for size change
1844 when loading metadata failed (in this case hasVideo() is false),
1845 we should prevent MediaPlayerPrivate to set width and height
1846 attribute of media element, otherwise we won't get the correct
1847 dimension for the following media sources.
1849 Internally reviewed by Max Feil.
1851 Test case: media/video-size.html
1853 * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1854 (WebCore::MediaPlayerPrivate::resizeSourceDimensions):
1856 2012-09-21 Dan Bernstein <mitz@apple.com>
1858 REGRESSION (r126763): Incorrect line breaking when both kerning and word spacing are enabled
1859 https://bugs.webkit.org/show_bug.cgi?id=97280
1861 Reviewed by Adele Peterson.
1863 Font::width() never applies word spacing to the first character in the TextRun. The
1864 TextLayout optimization tried to achieve this behavior by not applying word spacing to
1865 any character, which led to this bug.
1867 Test: fast/text/word-space-with-kerning-2.html
1869 * platform/graphics/mac/ComplexTextController.cpp:
1870 (WebCore::TextLayout::TextLayout): Changed to use the given font rather than a version
1871 without word spacing.
1872 (WebCore::TextLayout::width): Added a check if the run starts with a space at a non-zero
1873 offset. If that is the case, then the ComplexTextController has added word spacing to that
1874 space, so subtract it here in order to maintain the behavior described above.
1876 2012-09-21 Sheriff Bot <webkit.review.bot@gmail.com>
1878 Unreviewed, rolling out r129219.
1879 http://trac.webkit.org/changeset/129219
1880 https://bugs.webkit.org/show_bug.cgi?id=97338
1882 Presumably broke Apple Mac compilation (Requested by yurys_ on
1885 * bindings/js/JSHTMLCanvasElementCustom.cpp:
1886 (WebCore::JSHTMLCanvasElement::getContext):
1887 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1888 (WebCore::V8HTMLCanvasElement::getContextCallback):
1889 * inspector/InjectedScriptCanvasModule.cpp:
1890 (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1892 * inspector/InjectedScriptCanvasModule.h:
1893 (InjectedScriptCanvasModule):
1894 * inspector/InspectorCanvasAgent.cpp:
1895 * inspector/InspectorCanvasAgent.h:
1896 * inspector/InspectorCanvasInstrumentation.h:
1897 * inspector/InspectorInstrumentation.h:
1898 (InspectorInstrumentation):
1900 2012-09-21 Andrey Adaikin <aandrey@chromium.org>
1902 Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
1903 https://bugs.webkit.org/show_bug.cgi?id=97203
1905 Reviewed by Yury Semikhatsky.
1907 Implements wrapping a 2D canvas context through the injected canvas module script facility.
1909 * bindings/js/JSHTMLCanvasElementCustom.cpp:
1910 (WebCore::JSHTMLCanvasElement::getContext):
1911 * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1912 (WebCore::V8HTMLCanvasElement::getContextCallback):
1913 * inspector/InjectedScriptCanvasModule.cpp:
1914 (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
1916 (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
1917 (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
1918 * inspector/InjectedScriptCanvasModule.h:
1919 (InjectedScriptCanvasModule):
1920 * inspector/InspectorCanvasAgent.cpp:
1921 (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
1923 * inspector/InspectorCanvasAgent.h:
1924 (InspectorCanvasAgent):
1925 * inspector/InspectorCanvasInstrumentation.h:
1926 (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
1928 * inspector/InspectorInstrumentation.h:
1929 (InspectorInstrumentation):
1931 2012-09-20 Andrey Kosyakov <caseq@chromium.org>
1933 Web Inspector: [refactoring] simplify interface to FileOutputStream
1934 https://bugs.webkit.org/show_bug.cgi?id=97226
1936 Reviewed by Yury Semikhatsky.
1938 - change OutputStream interface to match that of stream;
1939 - fix OutputStream implementations (FileOutputStream and those in heap profiler);
1940 - fix usages in Timeline and HeapProfiler.
1942 * inspector/front-end/FileUtils.js:
1943 (WebInspector.OutputStream.prototype.write):
1944 (WebInspector.OutputStream.prototype.close):
1945 (WebInspector.ChunkedFileReader.prototype.start):
1946 (WebInspector.ChunkedFileReader.prototype._onChunkLoaded):
1947 (WebInspector.ChunkedXHRReader.prototype.start):
1948 (WebInspector.ChunkedXHRReader.prototype._onProgress):
1949 (WebInspector.ChunkedXHRReader.prototype._onLoad):
1950 (WebInspector.FileOutputStream):
1951 (WebInspector.FileOutputStream.prototype.open.callbackWrapper):
1952 (WebInspector.FileOutputStream.prototype.open):
1953 (WebInspector.FileOutputStream.prototype.write):
1954 (WebInspector.FileOutputStream.prototype.close):
1955 (WebInspector.FileOutputStream.prototype._onAppendDone):
1956 * inspector/front-end/HeapSnapshotLoader.js:
1957 (WebInspector.HeapSnapshotLoader.prototype.close):
1958 (WebInspector.HeapSnapshotLoader.prototype.write):
1959 * inspector/front-end/HeapSnapshotProxy.js:
1960 (WebInspector.HeapSnapshotLoaderProxy.prototype.startTransfer):
1961 (WebInspector.HeapSnapshotLoaderProxy.prototype.write):
1962 (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
1963 * inspector/front-end/HeapSnapshotView.js:
1964 (WebInspector.HeapProfileHeader):
1965 (WebInspector.HeapProfileHeader.prototype.load):
1966 (WebInspector.HeapProfileHeader.prototype._setupWorker):
1967 (WebInspector.HeapProfileHeader.prototype.dispose):
1968 (WebInspector.HeapProfileHeader.prototype.transferChunk.callback):
1969 (WebInspector.HeapProfileHeader.prototype.transferChunk):
1970 (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
1971 (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
1972 (WebInspector.HeapProfileHeader.prototype.saveToFile):
1973 * inspector/front-end/TimelineModel.js:
1974 (WebInspector.TimelineModel.prototype._createFileWriter):
1975 (WebInspector.TimelineModel.prototype.saveToFile.callback):
1976 (WebInspector.TimelineModel.prototype.saveToFile):
1977 (WebInspector.TimelineModelLoader):
1978 (WebInspector.TimelineModelLoader.prototype.write):
1979 (WebInspector.TimelineModelLoader.prototype.close):
1980 (WebInspector.TimelineSaver):
1981 (WebInspector.TimelineSaver.prototype.save):
1982 (WebInspector.TimelineSaver.prototype._writeNextChunk):
1984 2012-09-21 Alexandru Chiculita <achicu@adobe.com>
1986 -webkit-clip-path is applied on elements that are not descendant of the container
1987 https://bugs.webkit.org/show_bug.cgi?id=97217
1989 Reviewed by Dirk Schulze.
1991 The clip-path was set on the GraphicsContext, but was never restored, thus making all the layers
1992 rendered in the same "group" of save/restore state use the same clip-path.
1994 Test: css3/masking/clip-path-restore.html
1996 * css/StyleResolver.cpp:
1997 (WebCore::StyleResolver::collectMatchingRulesForList):
1998 clip-path property should create a stacking-context, otherwise the RenderLayers will not be nested,
1999 meaning that the clip-path of the parent is not going to apply correctly.
2001 * rendering/RenderLayer.cpp:
2002 (WebCore::RenderLayer::paintLayerContents):
2004 2012-09-21 Kent Tamura <tkent@chromium.org>
2006 Remove unused functions of LocalizedDate.h
2007 https://bugs.webkit.org/show_bug.cgi?id=97311
2009 Reviewed by Kentaro Hara.
2011 WebCore::localizedTimeFormatText, WebCore::localizedShortTimeFormatText,
2012 and WebCore::timeAMPMLabels are not used any more because we switched to
2013 the corresponding functions of Localizer.
2015 No new tests because of no behavior changes.
2017 * platform/text/Localizer.h:
2018 (Localizer): Moved comments from LocalizedDate.h.
2019 * platform/text/LocalizedDate.h:
2020 (WebCore): Removed localizedTimeFormatText,
2021 localizedShortTimeFormatText, and timeAMPMLabels.
2022 * platform/text/LocalizedDateICU.cpp:
2024 * platform/text/LocalizedDateWin.cpp:
2026 * platform/text/mac/LocalizedDateMac.cpp:
2029 2012-09-21 Keishi Hattori <keishi@webkit.org>
2031 Add datalist suggestions into DateTimeChooserParameters
2032 https://bugs.webkit.org/show_bug.cgi?id=97292
2034 Reviewed by Kent Tamura.
2036 We read datalist suggestions, add them to DateTimeChooserParameters,
2037 and pass them to the page popup.
2039 No new tests. No behavior change yet.
2041 * html/shadow/CalendarPickerElement.cpp:
2042 (WebCore::CalendarPickerElement::openPopup): Read datalist suggestions and add them to DateTimeChooserParameters
2043 * platform/DateTimeChooser.h:
2044 (DateTimeChooserParameters): Added localizedSuggestionValues so we can show localized values inside the page popup.
2046 2012-09-21 Yoshifumi Inoue <yosin@chromium.org>
2048 [Forms] DateTimeEditElement::layout() should take date time format as a parameter
2049 https://bugs.webkit.org/show_bug.cgi?id=97300
2051 Reviewed by Kent Tamura.
2053 This patch introduces DateTimeEditElement::LayoutParameters struct for
2054 passing four parameters to DateTimeEditElement::layout() for passing
2055 date time format from client of DateTimeEditElement instead of
2056 DateTimeEditElement::layout() takes time or short time format.
2058 This patch is a part of preparation of introducing multiple fields
2059 date/datetime/month/week input UI.
2061 This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
2062 ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2064 No new tests. This patch doesn't change behavior.
2066 * html/TimeInputType.cpp:
2067 (WebCore::TimeInputType::updateInnerTextValue): Changed to use LayoutParmeters.
2068 * html/shadow/DateTimeEditElement.cpp: Removed unused include files, LocalizedDate.h and LocalizedNumber.h.
2069 (DateTimeEditBuilder):
2070 (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed parameters to LayoutParmeters.
2071 (WebCore::DateTimeEditElement::LayoutParameters::shouldHaveSecondField): Moved from DateTimeEditBuilder::needSecondField().
2072 (WebCore::DateTimeEditElement::layout): Changed to take LayoutParameters.
2073 (WebCore::DateTimeEditElement::setValueAsDate): ditto
2074 (WebCore::DateTimeEditElement::setEmptyValue): ditto
2075 * html/shadow/DateTimeEditElement.h: Removed unused classe declarations DateComponents and DateTimeEditLayouter.
2076 (LayoutParameters): Added to bundle parameters for layout().
2077 (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters): Added.
2079 2012-09-20 Pavel Feldman <pfeldman@chromium.org>
2081 Web Inspector: render grid scale to the right / at bottom in case box is close to 0 on that axis.
2082 https://bugs.webkit.org/show_bug.cgi?id=97219
2084 Reviewed by Vsevolod Vlasov.
2086 Otherwise, it is hard to inspect objects close to (0, 0)
2088 * inspector/InspectorOverlayPage.html:
2090 2012-09-21 Sheriff Bot <webkit.review.bot@gmail.com>
2092 Unreviewed, rolling out r129086.
2093 http://trac.webkit.org/changeset/129086
2094 https://bugs.webkit.org/show_bug.cgi?id=97312
2096 Broke input rendering (Requested by shinyak on #webkit).
2098 * html/BaseButtonInputType.cpp:
2100 * html/BaseButtonInputType.h:
2101 (WebCore::BaseButtonInputType::BaseButtonInputType):
2102 (BaseButtonInputType):
2103 * html/FileInputType.cpp:
2104 (WebCore::UploadButtonElement::create):
2105 (WebCore::UploadButtonElement::createForMultiple):
2106 * html/HTMLInputElement.cpp:
2107 (WebCore::HTMLInputElement::parseAttribute):
2108 * html/InputType.cpp:
2111 * rendering/RenderButton.cpp:
2112 (WebCore::RenderButton::RenderButton):
2113 (WebCore::RenderButton::styleDidChange):
2114 (WebCore::RenderButton::updateFromElement):
2116 (WebCore::RenderButton::setText):
2117 (WebCore::RenderButton::text):
2118 * rendering/RenderButton.h:
2121 2012-09-21 Kihong Kwon <kihong.kwon@samsung.com>
2123 Remove useless class prototypes from Vibration.h
2124 https://bugs.webkit.org/show_bug.cgi?id=97304
2126 Reviewed by Kentaro Hara.
2128 Remove two useless class prototype statements in the Vibration.h
2130 * Modules/vibration/Vibration.h:
2132 2012-09-21 Keishi Hattori <keishi@webkit.org>
2134 Prepare CalendarPicker so we can add another picker, SuggetionPicker
2135 https://bugs.webkit.org/show_bug.cgi?id=97193
2137 Reviewed by Kent Tamura.
2139 Preparation so we can add another picker to CalendarPicker and switch
2142 No new tests. No behavior change.
2144 * Resources/pagepopups/calendarPicker.css:
2145 (.calendar-picker): Added so we can apply these styles just to calendar picker.
2146 * Resources/pagepopups/calendarPicker.js:
2147 (CalendarPicker.validateConfig): Renamed so each picker can validate the config object.
2149 (closePicker): Call Picker.cleanup().
2150 (openCalendarPicker):
2152 (CalendarPicker.prototype.cleanup): Cleanup event listener on document.body.
2153 * Resources/pagepopups/pickerCommon.js:
2154 (Picker.prototype.cleanup):
2156 2012-09-20 John Mellor <johnme@chromium.org>
2158 Text Autosizing: Cluster text at flow roots, for consistency and to avoid autosizing headers/footers.
2159 https://bugs.webkit.org/show_bug.cgi?id=97025
2161 Reviewed by Julien Chaffraix.
2163 This patch has 3 main changes:
2165 1. All text within a "cluster" (roughly equivalent to a CSS flow root /
2166 block formatting context) must have a uniform textAutosizingMultiplier,
2167 except for subtrees which are themselves clusters. This improves the
2168 consistency of the final output, since sibling blocks are now more
2169 likely to have the same multiplier (hence grow in proportion).
2171 2. Clusters must contain a minimum amount of text in order to be
2172 autosized (4 lines of text, assuming each char is 1em wide, so about
2173 2 lines of text in practice). This is to reduce the likelihood of
2174 autosizing things like headers and footers, which can be quite
2175 visually distracting. The rationale is that if a cluster contains
2176 very few lines of text then it's ok to have to zoom in and pan from
2177 side to side to read each line, since if there are very few lines of
2178 text you'll only need to pan across once or twice.
2180 3. To avoid adding a 3rd tree traversal, processSubtree/processBox were
2181 refactored such that all of Text Autosizing now happens as a single
2182 tree traversal (hence halving the number of tree traversals done).
2184 Tests: fast/text-autosizing/cluster-narrow-in-wide.html
2185 fast/text-autosizing/cluster-wide-in-narrow.html
2186 fast/text-autosizing/clusters-insufficient-text.html
2187 fast/text-autosizing/clusters-insufficient-width.html
2188 fast/text-autosizing/clusters-sufficient-text-except-in-root.html
2189 fast/text-autosizing/clusters-sufficient-width.html
2191 * rendering/TextAutosizer.cpp:
2192 (TextAutosizingWindowInfo):
2194 Added this struct to bundle together the various sizes that
2195 processSubtree needs to pass to every recursive call to
2196 processCluster and processContainer.
2198 (WebCore::TextAutosizer::processSubtree):
2200 - Bundle windowSize and minLayoutSize together as a single struct,
2201 TextAutosizingWindowInfo, rather than passing them separately.
2202 - Walk up the tree to find the current cluster and container, rather
2203 than (incorrectly) assuming that the layoutRoot is always a
2205 - Call processCluster instead of traversing the tree.
2207 (WebCore::TextAutosizer::processCluster):
2209 Calculates the multiplier based on the width of the cluster (moved
2210 the calculation here from processBox, since now the multiplier is
2211 fixed per cluster), and delegates to processContainer for the actual
2212 tree traversal (since clusters are also containers).
2214 (WebCore::contentHeightIsConstrained):
2216 Changed parameter to RenderBlock.
2218 (WebCore::TextAutosizer::processContainer):
2220 This now takes care of the whole tree traversal, recursively calling
2221 processCluster/processContainer when it encounters such an object,
2222 and setMultiplier on RenderText objects (as processBox used to).
2223 Also added a check that the RenderText's multiplier is not already
2224 equal to the target multiplier (to save needlessly setting it).
2226 (WebCore::TextAutosizer::isContainer):
2228 - Changed to be a positive (is) instead of negative (isNot) check.
2229 - Require objects to be RenderBlocks so it's easier to find them
2230 using containingBlock, and there don't seem to be many interesting
2231 RenderBoxes that aren't RenderBlocks.
2233 (WebCore::TextAutosizer::isAutosizingCluster):
2235 A container that is also a flow root / block formatting context
2236 (approximately), hence demarcates an independent region of the page,
2237 within which we want consistent autosizing.
2239 (WebCore::TextAutosizer::clusterShouldBeAutosized):
2241 Uses measureDescendantTextWidth and to check whether the cluster
2242 contains enough text to be worth autosizing.
2244 (WebCore::TextAutosizer::measureDescendantTextWidth):
2246 Recursively traverse the cluster, skipping constrained height
2247 containers as processContainer does, to measure how much autosizable
2248 text it contains. Early out as soon as the minimum text width is
2251 (WebCore::TextAutosizer::nextInPreOrderSkippingDescendantsOfContainers):
2253 Replaces nextInPreOrderMatchingFilter. The filter is now fixed to
2254 isContainer (we no longer need an isAutosizingCluster filter, since
2255 I consolidated the tree traversal), and filtered objects are
2256 actually returned (so they can in turn be recursively traversed),
2257 it's just their descendants that get skipped.
2259 * rendering/TextAutosizer.h:
2262 - Deleted RenderObjectFilterFunctor, since the filter of
2263 nextInPreOrderSkippingDescendantsOfContainers is now fixed.
2265 2012-09-20 Yoshifumi Inoue <yosin@chromium.org>
2267 [Platform] There are memory leak in LocaleICU
2268 https://bugs.webkit.org/show_bug.cgi?id=97289
2270 Reviewed by Kent Tamura.
2272 This patch adds udt_close() calls for medium time format and short
2273 time format data used in LocaleICU class to avoid memory leak.
2275 This memory leak is found by external tool Valgrind and reported in
2276 Chromium bug repositry(http://crbug.com/151006) with stack trace of
2277 call path of leaked memory.
2279 This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
2280 ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2282 No new tests. External tool such as Valgrind will check this memory leak.
2284 * platform/text/LocaleICU.cpp:
2285 (WebCore::LocaleICU::~LocaleICU): Added to call udt_close() for m_mediumTimeFormat
2286 and m_shortTimeFormat which have UDateFormat objects.
2288 2012-09-20 Kenichi Ishibashi <bashi@chromium.org>
2290 Chromium mac cannot display AppleColorEmoji
2291 https://bugs.webkit.org/show_bug.cgi?id=97286
2293 Reviewed by Kent Tamura.
2295 Disable AppleColorEmoji for now. We will re-enable it after Skia supports CTFontDrawGlyphs().
2297 No new tests. Fallback fonts should be used for emoji codepoints.
2299 * platform/graphics/mac/FontCacheMac.mm:
2300 (WebCore::FontCache::getFontDataForCharacters):
2302 2012-09-20 Luke Macpherson <macpherson@chromium.org>
2304 Fix use-after free when using a variable to specify a -webkit-filter.
2305 https://bugs.webkit.org/show_bug.cgi?id=97153
2307 Reviewed by Abhishek Arya.
2309 Make StyleResolver's m_pendingSVGDocuments a hashmap of RefPtr instead of raw pointers such that the document values cannot be freed prematurely.
2310 Present assumption is that storing raw pointers is ok because CSSValues will live as long as the StyleResolver instance, however that it no longer
2311 true when variables are used, so we must ensure we increment the reference counter to ensure the CSSValues are not freed prematurely.
2313 Test: fast/css/variables/var-filter.html
2315 * css/StyleResolver.cpp:
2316 (WebCore::StyleResolver::collectMatchingRulesForList):
2317 * css/StyleResolver.h:
2320 2012-09-20 Levi Weintraub <leviw@chromium.org>
2322 Prevent reading stale data from InlineTextBoxes
2323 https://bugs.webkit.org/show_bug.cgi?id=94750
2325 Reviewed by Abhishek Arya.
2327 Text from dirty InlineTextBoxes should never be read or used. This change
2328 enforces this design goal by forcefully zero-ing out the start and length
2329 of InlineTextBoxes when they're being marked dirty. Ideally, we'd also
2330 add asserts to the accessors for this data, but there are still several
2331 places in editing that cause this. https://bugs.webkit.org/show_bug.cgi?id=97264
2334 This change involves making markDirty virtual. Running the line-layout
2335 performance test as well as profiling resizing the html5 spec showed
2336 negligable impact with this change.
2338 No new tests as this doesn't change any proper behavior.
2341 (WebCore::Position::downstream): Adding a FIXME.
2342 * rendering/InlineBox.h:
2343 (WebCore::InlineBox::markDirty): Marking virtual to allow InlineTextBox to
2344 overload and zero out its start and length.
2345 * rendering/InlineTextBox.cpp:
2346 (WebCore::InlineTextBox::markDirty): Zeroing out the start and length when
2347 we mark the box dirty.
2348 * rendering/InlineTextBox.h:
2349 * rendering/RenderText.cpp:
2350 (WebCore::RenderText::setTextWithOffset): Adding a FIXME.
2352 2012-09-20 Adam Barth <abarth@webkit.org>
2354 Measure how often web pages use Worker and SharedWorker
2355 https://bugs.webkit.org/show_bug.cgi?id=97273
2357 Reviewed by Ojan Vafai.
2359 We're not considering removing these features, but it will give us a
2360 baseline idea of how often they're used.
2362 * page/FeatureObserver.h:
2363 * workers/SharedWorker.cpp:
2364 (WebCore::SharedWorker::create):
2365 * workers/Worker.cpp:
2366 (WebCore::Worker::create):
2368 2012-09-20 Tony Chang <tony@chromium.org>
2370 [chromium] Enable more clang warnings
2371 https://bugs.webkit.org/show_bug.cgi?id=97257
2373 Reviewed by James Robinson.
2375 Add -Wunused-parameter to WebCore targets. Apple's Mac compile already
2376 warns on this and it's a common source of error for Chromium patches.
2378 No new tests, should compile cleanly.
2380 * WebCore.gyp/WebCore.gyp:
2382 2012-09-20 Dan Bernstein <mitz@apple.com>
2384 Kerning never occurs between a space and the following glyph
2385 https://bugs.webkit.org/show_bug.cgi?id=97269
2387 Reviewed by Tim Horton.
2389 Covered by several existing tests.
2391 * platform/graphics/mac/ComplexTextController.cpp:
2392 (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Changed to not reset the advance
2393 of a space, and added a comment about how this also needs to be fixed for other characters
2394 that are treated as spaces.
2396 2012-09-20 Kenichi Ishibashi <bashi@chromium.org>
2398 [Chromium] Improve glyph selection of HarfBuzzShaper
2399 https://bugs.webkit.org/show_bug.cgi?id=97164
2401 Reviewed by Tony Chang.
2403 Take into account clusters for selection.
2405 Test: fast/text/international/hebrew-selection.html
2407 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
2408 (WebCore::HarfBuzzShaper::HarfBuzzRun::applyShapeResult): Removed m_logClusters.
2409 m_logCluster is no longer used.
2410 (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
2411 - If targetX is in the left side of the first cluster, return the leftmost character index.
2412 - If targetX is in the right side of the last cluster, return the rightmost character index.
2413 - If targetX is between the right side of the cluster N and the left side of the cluster N+1, then:
2414 - return N+1 for LTR.
2416 (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
2417 Find the cluster of index in question, then:
2418 - return the left side boundary of the cluster for LTR.
2419 - return the right side boundary of the cluster for RTL.
2420 * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
2423 2012-09-20 Tony Chang <tony@chromium.org>
2425 Replace RenderListBox::updateLogicalHeight with RenderListBox::computeLogicalHeight
2426 https://bugs.webkit.org/show_bug.cgi?id=97263
2428 Reviewed by Ojan Vafai.
2430 This is part of making computeLogicalHeight virtual so with any RenderBox pointer, one
2431 can compute the logical height without mutating the RenderBox.
2433 No new tests, this is a refactor and existing list box tests should pass.
2435 * rendering/RenderBox.h:
2437 * rendering/RenderListBox.cpp:
2438 (WebCore::RenderListBox::layout): Move layout related logic here.
2439 (WebCore::RenderListBox::computeLogicalHeight): Use const version and remove layout related code.
2440 * rendering/RenderListBox.h:
2441 (RenderListBox): Override computeLogicalHeight.
2443 2012-09-20 Mike West <mkwst@chromium.org>
2445 CSP reports should send an empty "blocked-uri" rather than nothing.
2446 https://bugs.webkit.org/show_bug.cgi?id=97256
2448 Reviewed by Adam Barth.
2450 In cases where a Content Security Policy violation report is generated
2451 without blocking a resource at a particular URI (inline scripts, for
2452 example), we currently leave the "blocked-uri" attribute out of the
2453 report entirely. For the same reason that we included the "referrer"
2454 attribute in webkit.org/b/97233, we should include an explicitly empty
2455 "blocked-uri" in these cases.
2457 This new behavior is covered by updates to existing test expectations
2458 around the reporting functionality.
2460 * page/ContentSecurityPolicy.cpp:
2461 (WebCore::ContentSecurityPolicy::reportViolation):
2462 If the 'blocked-uri' is invalid, add a "blocked-uri" attribute that
2463 is explicitly empty.
2465 2012-09-20 Patrick Gansterer <paroga@webkit.org>
2467 Add String::numberToFixedPrecisionString()
2468 https://bugs.webkit.org/show_bug.cgi?id=96330
2470 Reviewed by Benjamin Poulain.
2472 * platform/text/TextStream.cpp:
2473 (WebCore::TextStream::operator<<): Use the new function instead of String::number() with flags.
2475 2012-09-20 Adam Klein <adamk@chromium.org>
2477 Rename ContainerNode::parserAddChild "parserAppendChild" for consistency
2478 https://bugs.webkit.org/show_bug.cgi?id=97254
2480 Reviewed by Adam Barth.
2482 No functional change, all the below changes are simple renames.
2484 * dom/ContainerNode.cpp:
2485 (WebCore::ContainerNode::takeAllChildrenFrom):
2486 (WebCore::ContainerNode::parserAppendChild):
2487 * dom/ContainerNode.h:
2489 * dom/DOMImplementation.cpp:
2490 (WebCore::DOMImplementation::createDocument):
2491 * editing/markup.cpp:
2492 (WebCore::createFragmentForTransformToFragment):
2493 * html/HTMLViewSourceDocument.cpp:
2494 (WebCore::HTMLViewSourceDocument::createContainingTable):
2495 (WebCore::HTMLViewSourceDocument::addSpanWithClassName):
2496 (WebCore::HTMLViewSourceDocument::addLine):
2497 (WebCore::HTMLViewSourceDocument::finishLine):
2498 (WebCore::HTMLViewSourceDocument::addText):
2499 (WebCore::HTMLViewSourceDocument::addBase):
2500 (WebCore::HTMLViewSourceDocument::addLink):
2501 * html/parser/HTMLConstructionSite.cpp:
2502 (WebCore::executeTask):
2503 * html/parser/HTMLTreeBuilder.cpp:
2504 (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
2505 * html/track/WebVTTParser.cpp:
2506 (WebCore::WebVTTParser::constructTreeFromToken):
2507 * xml/XMLErrors.cpp:
2508 (WebCore::createXHTMLParserErrorHeader):
2509 (WebCore::XMLErrors::insertErrorMessageBlock):
2510 * xml/parser/XMLDocumentParser.cpp:
2511 (WebCore::XMLDocumentParser::enterText):
2512 (WebCore::XMLDocumentParser::parseDocumentFragment):
2513 * xml/parser/XMLDocumentParserLibxml2.cpp:
2514 (WebCore::XMLDocumentParser::startElementNs):
2515 (WebCore::XMLDocumentParser::processingInstruction):
2516 (WebCore::XMLDocumentParser::cdataBlock):
2517 (WebCore::XMLDocumentParser::comment):
2518 (WebCore::XMLDocumentParser::internalSubset):
2519 * xml/parser/XMLDocumentParserQt.cpp:
2520 (WebCore::XMLDocumentParser::parseStartElement):
2521 (WebCore::XMLDocumentParser::parseProcessingInstruction):
2522 (WebCore::XMLDocumentParser::parseCdata):
2523 (WebCore::XMLDocumentParser::parseComment):
2524 (WebCore::XMLDocumentParser::parseDtd):
2525 * xml/parser/XMLTreeBuilder.cpp:
2526 (WebCore::XMLTreeBuilder::processDOCTYPE):
2527 (WebCore::XMLTreeBuilder::processStartTag):
2528 (WebCore::XMLTreeBuilder::add):
2530 2012-09-20 James Robinson <jamesr@chromium.org>
2532 [chromium] Remove unused copy of chromium compositor implementation files
2533 https://bugs.webkit.org/show_bug.cgi?id=97255
2535 Reviewed by Adam Barth.
2537 Now that use_libcc_for_compositor is set to 1 these files aren't used anywhere.
2539 * WebCore.gyp/WebCore.gyp:
2541 * platform/chromium/support/CCThreadImpl.cpp: Removed.
2542 * platform/chromium/support/CCThreadImpl.h: Removed.
2543 * platform/chromium/support/WebCompositorImpl.cpp: Removed.
2544 * platform/chromium/support/WebCompositorImpl.h: Removed.
2545 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp: Removed.
2546 * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h: Removed.
2547 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp: Removed.
2548 * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h: Removed.
2549 * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
2550 (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
2551 (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
2552 * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp: Removed.
2553 * platform/graphics/chromium/CanvasLayerTextureUpdater.h: Removed.
2554 * platform/graphics/chromium/ContentLayerChromium.cpp: Removed.
2555 * platform/graphics/chromium/ContentLayerChromium.h: Removed.
2556 * platform/graphics/chromium/ContentLayerChromiumClient.h: Removed.
2557 * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp: Removed.
2558 * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h: Removed.
2559 * platform/graphics/chromium/GeometryBinding.cpp: Removed.
2560 * platform/graphics/chromium/GeometryBinding.h: Removed.
2561 * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2562 * platform/graphics/chromium/HeadsUpDisplayLayerChromium.cpp: Removed.
2563 * platform/graphics/chromium/HeadsUpDisplayLayerChromium.h: Removed.
2564 * platform/graphics/chromium/IOSurfaceLayerChromium.cpp: Removed.
2565 * platform/graphics/chromium/IOSurfaceLayerChromium.h: Removed.
2566 * platform/graphics/chromium/ImageLayerChromium.cpp: Removed.
2567 * platform/graphics/chromium/ImageLayerChromium.h: Removed.
2568 * platform/graphics/chromium/LayerChromium.cpp: Removed.
2569 * platform/graphics/chromium/LayerChromium.h: Removed.
2570 * platform/graphics/chromium/LayerTextureSubImage.cpp: Removed.
2571 * platform/graphics/chromium/LayerTextureSubImage.h: Removed.
2572 * platform/graphics/chromium/LayerTextureUpdater.h: Removed.
2573 * platform/graphics/chromium/PlatformColor.h: Removed.
2574 * platform/graphics/chromium/ProgramBinding.cpp: Removed.
2575 * platform/graphics/chromium/ProgramBinding.h: Removed.
2576 * platform/graphics/chromium/RateLimiter.cpp: Removed.
2577 * platform/graphics/chromium/RateLimiter.h: Removed.
2578 * platform/graphics/chromium/RenderSurfaceChromium.cpp: Removed.
2579 * platform/graphics/chromium/RenderSurfaceChromium.h: Removed.
2580 * platform/graphics/chromium/ScrollbarLayerChromium.cpp: Removed.
2581 * platform/graphics/chromium/ScrollbarLayerChromium.h: Removed.
2582 * platform/graphics/chromium/ShaderChromium.cpp: Removed.
2583 * platform/graphics/chromium/ShaderChromium.h: Removed.
2584 * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp: Removed.
2585 * platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.h: Removed.
2586 * platform/graphics/chromium/SolidColorLayerChromium.cpp: Removed.
2587 * platform/graphics/chromium/SolidColorLayerChromium.h: Removed.
2588 * platform/graphics/chromium/TextureCopier.cpp: Removed.
2589 * platform/graphics/chromium/TextureCopier.h: Removed.
2590 * platform/graphics/chromium/TextureLayerChromium.cpp: Removed.
2591 * platform/graphics/chromium/TextureLayerChromium.h: Removed.
2592 * platform/graphics/chromium/TextureLayerChromiumClient.h: Removed.
2593 * platform/graphics/chromium/ThrottledTextureUploader.cpp: Removed.
2594 * platform/graphics/chromium/ThrottledTextureUploader.h: Removed.
2595 * platform/graphics/chromium/TiledLayerChromium.cpp: Removed.
2596 * platform/graphics/chromium/TiledLayerChromium.h: Removed.
2597 * platform/graphics/chromium/TreeSynchronizer.cpp: Removed.
2598 * platform/graphics/chromium/TreeSynchronizer.h: Removed.
2599 * platform/graphics/chromium/UnthrottledTextureUploader.h: Removed.
2600 * platform/graphics/chromium/VideoLayerChromium.cpp: Removed.
2601 * platform/graphics/chromium/VideoLayerChromium.h: Removed.
2602 * platform/graphics/chromium/cc/CCActiveAnimation.cpp: Removed.
2603 * platform/graphics/chromium/cc/CCActiveAnimation.h: Removed.
2604 * platform/graphics/chromium/cc/CCAnimationCurve.cpp: Removed.
2605 * platform/graphics/chromium/cc/CCAnimationCurve.h: Removed.
2606 * platform/graphics/chromium/cc/CCAnimationEvents.h: Removed.
2607 * platform/graphics/chromium/cc/CCAppendQuadsData.h: Removed.
2608 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp: Removed.
2609 * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h: Removed.
2610 * platform/graphics/chromium/cc/CCCompletionEvent.h: Removed.
2611 * platform/graphics/chromium/cc/CCDamageTracker.cpp: Removed.
2612 * platform/graphics/chromium/cc/CCDamageTracker.h: Removed.
2613 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp: Removed.
2614 * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h: Removed.
2615 * platform/graphics/chromium/cc/CCDebugRectHistory.cpp: Removed.
2616 * platform/graphics/chromium/cc/CCDebugRectHistory.h: Removed.
2617 * platform/graphics/chromium/cc/CCDelayBasedTimeSource.cpp: Removed.
2618 * platform/graphics/chromium/cc/CCDelayBasedTimeSource.h: Removed.
2619 * platform/graphics/chromium/cc/CCDirectRenderer.cpp: Removed.
2620 * platform/graphics/chromium/cc/CCDirectRenderer.h: Removed.
2621 * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed.
2622 * platform/graphics/chromium/cc/CCDrawQuad.h: Removed.
2623 * platform/graphics/chromium/cc/CCFontAtlas.cpp: Removed.
2624 * platform/graphics/chromium/cc/CCFontAtlas.h: Removed.
2625 * platform/graphics/chromium/cc/CCFrameRateController.cpp: Removed.
2626 * platform/graphics/chromium/cc/CCFrameRateController.h: Removed.
2627 * platform/graphics/chromium/cc/CCFrameRateCounter.cpp: Removed.
2628 * platform/graphics/chromium/cc/CCFrameRateCounter.h: Removed.
2629 * platform/graphics/chromium/cc/CCGraphicsContext.h: Removed.
2630 * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp: Removed.
2631 * platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h: Removed.
2632 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp: Removed.
2633 * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h: Removed.
2634 * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp: Removed.
2635 * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.h: Removed.
2636 * platform/graphics/chromium/cc/CCInputHandler.h: Removed.
2637 * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.cpp: Removed.
2638 * platform/graphics/chromium/cc/CCKeyframedAnimationCurve.h: Removed.
2639 * platform/graphics/chromium/cc/CCLayerAnimationController.cpp: Removed.
2640 * platform/graphics/chromium/cc/CCLayerAnimationController.h: Removed.
2641 * platform/graphics/chromium/cc/CCLayerImpl.cpp: Removed.
2642 * platform/graphics/chromium/cc/CCLayerImpl.h: Removed.
2643 * platform/graphics/chromium/cc/CCLayerIterator.cpp: Removed.
2644 * platform/graphics/chromium/cc/CCLayerIterator.h: Removed.
2645 * platform/graphics/chromium/cc/CCLayerQuad.cpp: Removed.
2646 * platform/graphics/chromium/cc/CCLayerQuad.h: Removed.
2647 * platform/graphics/chromium/cc/CCLayerSorter.cpp: Removed.
2648 * platform/graphics/chromium/cc/CCLayerSorter.h: Removed.
2649 * platform/graphics/chromium/cc/CCLayerTilingData.cpp: Removed.
2650 * platform/graphics/chromium/cc/CCLayerTilingData.h: Removed.
2651 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: Removed.
2652 * platform/graphics/chromium/cc/CCLayerTreeHost.h: Removed.
2653 * platform/graphics/chromium/cc/CCLayerTreeHostClient.h: Removed.
2654 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Removed.
2655 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Removed.
2656 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: Removed.
2657 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: Removed.
2658 * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed.
2659 * platform/graphics/chromium/cc/CCMathUtil.h: Removed.
2660 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: Removed.
2661 * platform/graphics/chromium/cc/CCOcclusionTracker.h: Removed.
2662 * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp: Removed.
2663 * platform/graphics/chromium/cc/CCOverdrawMetrics.h: Removed.
2664 * platform/graphics/chromium/cc/CCPageScaleAnimation.cpp: Removed.
2665 * platform/graphics/chromium/cc/CCPageScaleAnimation.h: Removed.
2666 * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Removed.
2667 * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Removed.
2668 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Removed.
2669 * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Removed.
2670 * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Removed.
2671 * platform/graphics/chromium/cc/CCPriorityCalculator.h: Removed.
2672 * platform/graphics/chromium/cc/CCProxy.cpp: Removed.
2673 * platform/graphics/chromium/cc/CCProxy.h: Removed.
2674 * platform/graphics/chromium/cc/CCQuadCuller.cpp: Removed.
2675 * platform/graphics/chromium/cc/CCQuadCuller.h: Removed.
2676 * platform/graphics/chromium/cc/CCQuadSink.h: Removed.
2677 * platform/graphics/chromium/cc/CCRenderPass.cpp: Removed.
2678 * platform/graphics/chromium/cc/CCRenderPass.h: Removed.
2679 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Removed.
2680 * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Removed.
2681 * platform/graphics/chromium/cc/CCRenderPassSink.h: Removed.
2682 * platform/graphics/chromium/cc/CCRenderSurface.cpp: Removed.
2683 * platform/graphics/chromium/cc/CCRenderSurface.h: Removed.
2684 * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp: Removed.
2685 * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h: Removed.
2686 * platform/graphics/chromium/cc/CCRenderer.h: Removed.
2687 * platform/graphics/chromium/cc/CCRendererGL.cpp: Removed.
2688 * platform/graphics/chromium/cc/CCRendererGL.h: Removed.
2689 * platform/graphics/chromium/cc/CCRenderingStats.h: Removed.
2690 * platform/graphics/chromium/cc/CCResourceProvider.cpp: Removed.
2691 * platform/graphics/chromium/cc/CCResourceProvider.h: Removed.
2692 * platform/graphics/chromium/cc/CCScheduler.cpp: Removed.
2693 * platform/graphics/chromium/cc/CCScheduler.h: Removed.
2694 * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: Removed.
2695 * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: Removed.
2696 * platform/graphics/chromium/cc/CCScopedTexture.cpp: Removed.
2697 * platform/graphics/chromium/cc/CCScopedTexture.h: Removed.
2698 * platform/graphics/chromium/cc/CCScopedThreadProxy.h: Removed.
2699 * platform/graphics/chromium/cc/CCScrollbarAnimationController.cpp: Removed.
2700 * platform/graphics/chromium/cc/CCScrollbarAnimationController.h: Removed.
2701 * platform/graphics/chromium/cc/CCScrollbarAnimationControllerLinearFade.cpp: Removed.
2702 * platform/graphics/chromium/cc/CCScrollbarAnimationControllerLinearFade.h: Removed.
2703 * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.cpp: Removed.
2704 * platform/graphics/chromium/cc/CCScrollbarGeometryFixedThumb.h: Removed.
2705 * platform/graphics/chromium/cc/CCScrollbarGeometryStub.cpp: Removed.
2706 * platform/graphics/chromium/cc/CCScrollbarGeometryStub.h: Removed.
2707 * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp: Removed.
2708 * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h: Removed.
2709 * platform/graphics/chromium/cc/CCSettings.cpp: Removed.
2710 * platform/graphics/chromium/cc/CCSettings.h: Removed.
2711 * platform/graphics/chromium/cc/CCSharedQuadState.cpp: Removed.
2712 * platform/graphics/chromium/cc/CCSharedQuadState.h: Removed.
2713 * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: Removed.
2714 * platform/graphics/chromium/cc/CCSingleThreadProxy.h: Removed.
2715 * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp: Removed.
2716 * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h: Removed.
2717 * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp: Removed.
2718 * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h: Removed.
2719 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp: Removed.
2720 * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h: Removed.
2721 * platform/graphics/chromium/cc/CCTexture.cpp: Removed.
2722 * platform/graphics/chromium/cc/CCTexture.h: Removed.
2723 * platform/graphics/chromium/cc/CCTextureDrawQuad.cpp: Removed.
2724 * platform/graphics/chromium/cc/CCTextureDrawQuad.h: Removed.
2725 * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp: Removed.
2726 * platform/graphics/chromium/cc/CCTextureLayerImpl.h: Removed.
2727 * platform/graphics/chromium/cc/CCTextureUpdateController.cpp: Removed.
2728 * platform/graphics/chromium/cc/CCTextureUpdateController.h: Removed.
2729 * platform/graphics/chromium/cc/CCTextureUpdateQueue.cpp: Removed.
2730 * platform/graphics/chromium/cc/CCTextureUpdateQueue.h: Removed.
2731 * platform/graphics/chromium/cc/CCThread.h: Removed.
2732 * platform/graphics/chromium/cc/CCThreadProxy.cpp: Removed.
2733 * platform/graphics/chromium/cc/CCThreadProxy.h: Removed.
2734 * platform/graphics/chromium/cc/CCThreadTask.h: Removed.
2735 * platform/graphics/chromium/cc/CCTileDrawQuad.cpp: Removed.
2736 * platform/graphics/chromium/cc/CCTileDrawQuad.h: Removed.
2737 * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: Removed.
2738 * platform/graphics/chromium/cc/CCTiledLayerImpl.h: Removed.
2739 * platform/graphics/chromium/cc/CCTimeSource.h: Removed.
2740 * platform/graphics/chromium/cc/CCTimer.cpp: Removed.
2741 * platform/graphics/chromium/cc/CCTimer.h: Removed.
2742 * platform/graphics/chromium/cc/CCTimingFunction.cpp: Removed.
2743 * platform/graphics/chromium/cc/CCTimingFunction.h: Removed.
2744 * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: Removed.
2745 * platform/graphics/chromium/cc/CCVideoLayerImpl.h: Removed.
2746 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp: Removed.
2747 * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h: Removed.
2749 2012-09-20 Tony Chang <tony@chromium.org>
2751 Implement absolutely positioned flex items
2752 https://bugs.webkit.org/show_bug.cgi?id=93798
2754 Reviewed by Ojan Vafai.
2756 Previously, we treated absolutely positioned flex items as a 0x0 placeholder element.
2757 Now we position the 0x0 placeholder where the next item would go. This causes the
2759 - justify-content: space-{around,between} no longer change due to the existence of absolutely positioned flex items.
2760 - alignment doesn't change the placement of absolutely positioned flex items.
2761 - auto margins in the alignment direction don't do anything on absolutely positioned flex items.
2763 Test: css3/flexbox/position-absolute-children.html
2765 * rendering/RenderFlexibleBox.cpp:
2766 (WebCore::RenderFlexibleBox::availableAlignmentSpaceForChild): Absolutely positioned flex items should not use this.
2767 (WebCore::RenderFlexibleBox::updateAutoMarginsInCrossAxis): Absolutely positioned flex items should not use this.
2768 (WebCore::initialJustifyContentOffset): If there are no flex items, space-around should center an absolutely positioned flex item.
2769 (WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren): Helper method for helping to compute space-between and space-around.
2770 (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Fix spacing when space-between or space-around.
2771 (WebCore::RenderFlexibleBox::layoutColumnReverse): Fix spacing when space-between or space-around.
2772 (WebCore::RenderFlexibleBox::alignChildren): Treat absolutely positioned children like flex-start.
2773 * rendering/RenderFlexibleBox.h: numberOfInFlowPositionedChildren method.
2775 2012-09-20 Sheriff Bot <webkit.review.bot@gmail.com>
2777 Unreviewed, rolling out r129144.
2778 http://trac.webkit.org/changeset/129144
2779 https://bugs.webkit.org/show_bug.cgi?id=97244
2781 causing lots of assertions in tests (Requested by smfr on
2784 * rendering/InlineBox.h:
2785 (WebCore::InlineBox::markDirty):
2786 * rendering/InlineTextBox.cpp:
2787 * rendering/InlineTextBox.h:
2788 (WebCore::InlineTextBox::start):
2789 (WebCore::InlineTextBox::end):
2790 (WebCore::InlineTextBox::len):
2791 (WebCore::InlineTextBox::offsetRun):
2793 2012-09-20 Mike West <mkwst@chromium.org>
2795 CSP reports should send an empty 'referrer' rather than nothing.
2796 https://bugs.webkit.org/show_bug.cgi?id=97233
2798 Reviewed by Adam Barth.
2800 Currently, if a protected resource doesn't have a referrer, then any
2801 Content Security Policy violations send a report that doesn't contain
2802 a referrer attribute. It's arguably friendlier to developers to include
2803 an explicitly empty attribute.
2805 This new behavior is covered by updates to existing test expectations
2806 around the reporting functionality.
2808 * page/ContentSecurityPolicy.cpp:
2809 (WebCore::ContentSecurityPolicy::reportViolation):
2810 Drop the 'if', and always write out a referrer.
2812 2012-09-20 David Barton <dbarton@mathscribe.com>
2814 [MathML] Increase visual space around fraction parts, italic variables, and operators
2815 https://bugs.webkit.org/show_bug.cgi?id=97228
2817 Reviewed by Eric Seidel.
2819 This makes MathML more readable, and more in agreement with Firefox and TeX.
2821 Tested by existing tests.
2824 (mfrac > :first-child):
2825 (mfrac > :last-child):
2828 (msub > mi:first-child, msubsup > mi:first-child):
2829 - Subscripts don't need to move right after an italic <mi>.
2830 (msubsup > mi:first-child + * + *):
2831 - Superscripts do need to move right after an italic <mi>.
2832 (math > mo, mrow > mo, msqrt > mo, mtd > mo):
2833 - These are ok values for now. It will be better to use different values for different operators, as the FIXME says.
2834 (math > mo:last-child, mrow > mo:last-child, msqrt > mo:last-child, mtd > mo:last-child):
2835 - Prefix and postfix operators, including fences, generally get less spacing than infix operators.
2837 * rendering/mathml/RenderMathMLFenced.cpp:
2838 (WebCore::RenderMathMLFenced::createMathMLOperator):
2839 - Usually the separator is a comma or semicolon, so we only put space after it for now.
2840 (WebCore::RenderMathMLFenced::makeFences):
2841 (WebCore::RenderMathMLFenced::addChild):
2842 (WebCore::RenderMathMLFenced::styleDidChange):
2843 * rendering/mathml/RenderMathMLFenced.h:
2844 (RenderMathMLFenced):
2846 * rendering/mathml/RenderMathMLFraction.cpp:
2848 (WebCore::RenderMathMLFraction::updateFromElement):
2849 - gDenominatorPad is now handled by mathml.css.
2851 * rendering/mathml/RenderMathMLSubSup.cpp:
2853 (WebCore::RenderMathMLSubSup::fixScriptsStyle):
2854 - gSubsupScriptMargin is now handled by mathml.css.
2856 2012-09-20 Tommy Widenflycht <tommyw@google.com>
2858 MediaStream API: Extend UserMediaRequest with a ownerDocument method
2859 https://bugs.webkit.org/show_bug.cgi?id=97095
2861 Reviewed by Adam Barth.
2863 Chromium need to know exactly which frame called getUserMedia so that it can
2864 clean away the stream when the frame goes away.
2865 Since that information is available in webkit add an accessor method.
2867 Chromium mock class extended to test the added method.
2869 * Modules/mediastream/UserMediaRequest.cpp:
2870 (WebCore::UserMediaRequest::ownerDocument):
2872 * Modules/mediastream/UserMediaRequest.h:
2876 2012-09-20 Levi Weintraub <leviw@chromium.org>
2878 Prevent reading stale data from InlineTextBoxes
2879 https://bugs.webkit.org/show_bug.cgi?id=94750
2881 Reviewed by Eric Seidel.
2883 Text from dirty InlineTextBoxes should never be read or used. This change enforces this
2884 design goal by forcefully zero-ing out the start and length of InlineTextBoxes when
2885 they're being marked dirty. It also adds asserts to accessors for those members.
2887 This change involves making markDirty virtual. Running the line-layout performance test
2888 as well as profiling resizing the html5 spec showed negligable impact with this change.
2890 No new tests as this doesn't change any proper behavior.
2892 * rendering/InlineBox.h:
2893 (WebCore::InlineBox::markDirty): Making virtual to allow InlineTextBox to overload and
2894 zero out its start and length.
2895 * rendering/InlineTextBox.cpp:
2896 (WebCore::InlineTextBox::markDirty): Zeroing out start and length when we mark the box dirty.
2897 * rendering/InlineTextBox.h:
2898 (WebCore::InlineTextBox::start): Adding an assert when we hit this case.
2899 (WebCore::InlineTextBox::end): Ditto.
2900 (WebCore::InlineTextBox::len): Ditto.
2901 (WebCore::InlineTextBox::offsetRun): Ditto.
2903 2012-09-20 Mike West <mkwst@chromium.org>
2905 Support paths in Content Security Policy directives.
2906 https://bugs.webkit.org/show_bug.cgi?id=89750
2908 Reviewed by Adam Barth.
2910 In CSP 1.0, paths are simply ignored: 'script-src
2911 http://example.com/path/to/a/file' would allow script to be loaded from
2912 http://example.com/path/to/a/file/javascript.js, but also from
2913 http://example.com/javascript.js.
2915 This patch is an experimental implementation of more granular path
2916 support in CSP source lists as proposed in the current editor's draft of
2917 CSP 1.1. Paths are treated as specifying directories in which resources
2918 can be found, and are implicitly terminated with a '/': in other words,
2919 'script-src http://a.com/path' is the same as
2920 'script-src http://a.com/path/'. Moreover, paths cannot contain either
2921 '?' or '#' characters.
2923 This is implemented outside the CSP_NEXT flag. All ports will be
2926 Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#matching
2928 Tests: http/tests/security/contentSecurityPolicy/source-list-parsing-paths-01.html
2929 http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02.html
2931 * page/ContentSecurityPolicy.cpp:
2932 (WebCore::CSPSource::CSPSource):
2933 Store a path along with each CSP source.
2934 (WebCore::CSPSource::matches):
2935 Check the path when comparing a URL to the source.
2936 (WebCore::CSPSource::pathMatches):
2937 Compare the URL-decoded version of the resource to validate against
2938 the source's stored path. If the resource's path begins with the
2939 stored path, then it matches! If not, it doesn't.
2941 Store a path along with each CSP source.
2942 (WebCore::CSPSourceList::parse):
2943 Pass a 'path' in when creating CSPSource objects.
2944 (WebCore::CSPSourceList::parsePath):
2945 Actually parse the path, flagging errors if '?' or '#' are present,
2946 URL-decoding the result, and ensuring that a terminal '/' is
2948 (WebCore::CSPSourceList::addSourceSelf):
2949 Ensure that 'self' sources have an empty path.
2950 * page/ContentSecurityPolicy.h:
2951 Dropping the "ignored path component" console warning.
2953 2012-09-20 Joanmarie Diggs <jdiggs@igalia.com>
2955 [GTK] ControlsPanel string is not localized in LocalizedStringsGtk
2956 https://bugs.webkit.org/show_bug.cgi?id=96502
2958 Reviewed by Chris Fleizach.
2960 Adds the ControlsPanel string to the strings localized in LocalizedStringsGtk.
2962 Test: platform/gtk/accessibility/media-controls-panel-title.html
2964 * platform/gtk/LocalizedStringsGtk.cpp:
2965 (WebCore::localizedMediaControlElementString):
2967 2012-09-20 Julien Chaffraix <jchaffraix@webkit.org>
2969 Remove isStartColumn in the border collapsing code
2970 https://bugs.webkit.org/show_bug.cgi?id=97024
2972 Reviewed by Abhishek Arya.
2974 isStartColumn is embedding the same information as prevCell. As we need to compute it
2975 in most of the cases, we may as well just reuse them.
2977 While touching this code, I cleaned up the code by removing some unneeded checks and renaming
2978 some variables in preparation for bug 79272.
2980 Refactoring covered by existing collapsing borders tests.
2982 * rendering/RenderTableCell.cpp:
2983 (WebCore::RenderTableCell::computeCollapsedStartBorder):
2984 Removed |isStartColumn|.
2986 (WebCore::RenderTableCell::computeCollapsedEndBorder):
2987 Added a comment about why |isEndColumn| is needed. Also cleaned up this code to be
2988 consistent with computeCollapsedStartBorder.
2990 2012-09-20 Andrey Adaikin <aandrey@chromium.org>
2992 Web Inspector: setPropertyValue does not work for non-finite numbers
2993 https://bugs.webkit.org/show_bug.cgi?id=97016
2995 Reviewed by Vsevolod Vlasov.
2997 Fix: setting a property to NaN, Infinity or -Infinity numbers did not work.
2999 * inspector/front-end/RemoteObject.js:
3000 (WebInspector.RemoteObject.prototype.setPropertyValue):
3002 2012-09-20 Otto Derek Cheung <otcheung@rim.com>
3004 Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
3005 https://bugs.webkit.org/show_bug.cgi?id=95491
3007 Reviewed by Vsevolod Vlasov.
3009 Web Inspector: Cookie info in Network Resources Cookies tab are incorrect
3010 https://bugs.webkit.org/show_bug.cgi?id=95491
3012 Fixing a typo that causes cookies to appear as a "Session"
3013 cookie in the Networking panel because it can never find a properly named
3016 This bug exposes another bug where the cookie GMT strings are inproperly
3017 parsed, causing an "invalid date" error to show up in the cookies tab in
3018 the Networking panel.
3020 Also changed test expectations in LayoutTests/inspector/cookie-parser-expected.txt
3022 * inspector/front-end/CookieParser.js:
3023 (WebInspector.Cookie.prototype.get session):
3025 2012-09-20 Alexander Pavlov <apavlov@chromium.org>
3027 Web Inspector: [Elements] Word wrap disablement in the DOM tree broken
3028 https://bugs.webkit.org/show_bug.cgi?id=97185
3030 Reviewed by Pavel Feldman.
3032 Restored the effective "white-space: nowrap" for the tree elements.
3034 * inspector/front-end/inspector.css:
3037 2012-09-20 Allan Sandfeld Jensen <allan.jensen@nokia.com>
3039 [TouchAdjustment] Simplify and improve hybrid distance function.
3040 https://bugs.webkit.org/show_bug.cgi?id=96519
3042 Reviewed by Antonio Gomes.
3044 The current distance function is a combination of two functions. One measuring the distance from
3045 the hot-spot in the touch-area to the centerline of the target, and one measuring how much of the
3048 The distance to the center-line was used instead of just the distance to the target, to make it
3049 easier to hit small targets near big targets. The very same feature is however also the reason
3050 measuring how much the target is covered is added. Using the distance to center-line is therefore
3051 redundant now, and can be replaced with the simpler 'distance the hot-spot needs to be adjusted'.
3053 Tested by existing touchadjustment tests.
3055 * page/TouchAdjustment.cpp:
3057 (WebCore::TouchAdjustment::hybridDistanceFunction):
3058 * platform/graphics/IntRect.cpp:
3059 * platform/graphics/IntRect.h:
3062 2012-09-20 Yoshifumi Inoue <yosin@chromium.org>
3064 [Forms] HTMLSelectElement should call formStateDidChange on both menulist and lisbox mode
3065 https://bugs.webkit.org/show_bug.cgi?id=97177
3067 Reviewed by Kent Tamura.
3069 This patch makes listbox mode select element to call formStateDidChange()
3070 when selected options are changed.
3072 For this change, this patch moves notifyFormStateChanged() to
3073 HTMLFormControlElementWithState class from HTMLTextFormControlElement
3074 for sharing code HTMLSelectElement class and HTMLInputElement/HTMLTextAreaElement
3075 derived from HTMLTextFormControlElement.
3077 No new tests. We can't test this change in WebKit test tools. Test script
3078 will be implemented in Chromium side.
3080 * html/HTMLFormControlElementWithState.cpp:
3081 (WebCore::HTMLFormControlElementWithState::notifyFormStateChanged):
3083 * html/HTMLFormControlElementWithState.h: Moved a declaration of notifyFormStateChanged() from HTMLTextFormControlElement.
3084 (HTMLFormControlElementWithState): Moved an implemented of notifyFormStateChanged() from HTMLTextFormControlElement.
3085 * html/HTMLSelectElement.cpp:
3086 (WebCore::HTMLSelectElement::selectOption): Changed to call notifyFormStateChanged() instead of formStateDidChange().
3087 (WebCore::HTMLSelectElement::updateListBoxSelection): Changed to call notifyFormStateChanged().
3088 * html/HTMLTextFormControlElement.cpp: Moved an implemented of notifyFormStateChanged() to HTMLFormControlElementWithState class.
3089 * html/HTMLTextFormControlElement.h: Moved a declaration of notifyFormStateChanged() to HTMLFormControlElementWithState class.
3091 2012-09-20 Keishi Hattori <keishi@webkit.org>
3093 REGRESSION(r127727): Can't navigate between months with arrow keys in calendar picker
3094 https://bugs.webkit.org/show_bug.cgi?id=97166
3096 Reviewed by Kent Tamura.
3098 Fixing bug in r127727 so arrow keys work properly.
3100 Test: fast/forms/date/calendar-picker-key-operations.html
3102 * Resources/pagepopups/calendarPicker.js:
3103 (DaysTable.prototype._maybeSetPreviousMonth):
3104 (DaysTable.prototype._maybeSetNextMonth):
3106 2012-09-18 Alexander Pavlov <apavlov@chromium.org>
3108 Web Inspector: Use and process the actual ScriptId in the protocol EventListener object
3109 https://bugs.webkit.org/show_bug.cgi?id=93271
3111 Reviewed by Yury Semikhatsky.
3113 - Use the actual script identifier in the "location" object's "scriptId" field
3114 for the DOM.EventListener protocol type, but send the script URL in the new "sourceName" field.
3115 - Use 0-based lines in the "location" object's "lineNumber" field for linkifyRawLocation() to work correctly.
3116 - Fixed formatting of links to listener locations to contain "(program)" rather than empty string.
3118 * bindings/js/ScriptEventListener.cpp:
3119 (WebCore::eventListenerHandlerLocation):
3120 * bindings/js/ScriptEventListener.h:
3122 * bindings/v8/ScriptEventListener.cpp:
3123 (WebCore::eventListenerHandlerLocation):
3124 * bindings/v8/ScriptEventListener.h:
3126 * inspector/Inspector.json:
3127 * inspector/InspectorDOMAgent.cpp:
3128 (WebCore::InspectorDOMAgent::buildObjectForEventListener):
3129 * inspector/front-end/BreakpointsSidebarPane.js:
3130 * inspector/front-end/EventListenersSidebarPane.js:
3131 * inspector/front-end/Linkifier.js:
3132 (WebInspector.Linkifier.DefaultFormatter.prototype.formatLiveAnchor):
3133 * inspector/front-end/ResourceUtils.js:
3134 (WebInspector.formatLinkText): Use "(program)" if URL is empty.
3136 2012-09-19 Dan Bernstein <mitz@apple.com>
3138 WebCore part of adding a setting and API for disabling screen font substitution
3139 https://bugs.webkit.org/show_bug.cgi?id=97168
3141 Reviewed by Tim Horton.
3143 * WebCore.exp.in: Added an entry for Settings::setScreenFontSubstitutionEnabled.
3144 * css/StyleResolver.cpp:
3145 (WebCore::StyleResolver::collectMatchingRulesForList): Changed to use printer fonts if
3146 screen font substitution is not enabled.
3147 * page/Settings.cpp:
3148 (WebCore::Settings::Settings): Added initializer for new m_screenFontSubstitutionEnabled
3149 member variable. The initial value is true, matching existing behavior.
3150 (WebCore::Settings::setScreenFontSubstitutionEnabled): Added this setter, which updated the
3151 member variable and forces a style recalc in all pages using this Settings.
3153 (Settings): Added m_screenFontSubstitutionEnabled boolean member variable.
3154 (WebCore::Settings::screenFontSubstitutionEnabled): Added this getter.
3156 2012-09-19 Yoshifumi Inoue <yosin@chromium.org>
3158 [Forms] multiple fields time input UI should call notifyFormStateChanged() when value of field is changed
3159 https://bugs.webkit.org/show_bug.cgi?id=97169
3161 Reviewed by Kent Tamura.
3163 This patch makes multiple fields time input UI calls notifyFormStateChanged()
3164 when field value is changed as other input types do.
3166 This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
3167 ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
3169 No new tests. We can't test this change in WebKit test tools. Test script
3170 will be implemented in Chromium side.
3172 * html/TimeInputType.cpp:
3173 (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged):
3175 2012-09-19 Keishi Hattori <keishi@webkit.org>
3177 REGRESSION(r127727): Calendar picker focus ring should be hidden until key event
3178 https://bugs.webkit.org/show_bug.cgi?id=97165
3180 Reviewed by Kent Tamura.
3182 The regression was caused because NoFocusRing class was being removed
3183 from then main element inside resetMain().
3185 No new tests. Covered by calendar-picker-appearance.html.
3187 * Resources/pagepopups/calendarPicker.js:
3190 (CalendarPicker.prototype._layout):
3191 (DaysTable.prototype._handleKey):
3192 (CalendarPicker.prototype._handleBodyKeyDown):
3193 (CalendarPicker.prototype.maybeUpdateFocusStyle): Make this a method of CalendarPicker because we don't use it for other pickers.
3195 2012-09-19 David Grogan <dgrogan@chromium.org>
3197 IndexedDB: Print console warning about setVersion
3198 https://bugs.webkit.org/show_bug.cgi?id=96575
3200 Reviewed by Tony Chang.
3202 setVersion has been out of the spec for almost a year but there are
3203 still a lot of users.
3205 We show the warning once per database object as an approximation for
3208 No new tests, but 150-something rebaselines.
3210 * Modules/indexeddb/IDBDatabase.cpp:
3211 (WebCore::IDBDatabase::IDBDatabase):
3212 (WebCore::IDBDatabase::setVersion):
3213 * Modules/indexeddb/IDBDatabase.h:
3216 2012-09-19 Sean Wang <Xuewen.Wang@torchmobile.com.cn>
3218 [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
3219 https://bugs.webkit.org/show_bug.cgi?id=96362
3221 Reviewed by Rob Buis.
3223 This patch enable reading credentials from the persistent credential storage
3224 when it is not private browsing mode and there is not a credential in the RAM
3225 for the requested resource.
3227 Since we don't load persistent stored credentials into RAM at the starting time,
3228 even we have saved the credentials at the last browsing, after restarting the browser,
3229 it will still challenge for credentials for the requesting resources.
3231 No new tests, it uses the original authentication tests. There is no way to
3232 clear all credentials or restarting browsers to test this feature.
3234 * platform/network/blackberry/CredentialBackingStore.cpp:
3235 (WebCore::CredentialBackingStore::getProtectionSpace):
3237 * platform/network/blackberry/CredentialBackingStore.h:
3238 (CredentialBackingStore):
3239 * platform/network/blackberry/NetworkManager.cpp:
3240 (WebCore::NetworkManager::startJob):
3242 2012-09-19 Shinya Kawanaka <shinyak@chromium.org>
3244 [Refactoring] ButtonInputType of <input> element should have innerElement to make <input> AuthorShadowDOM-ready
3245 https://bugs.webkit.org/show_bug.cgi?id=95939
3247 Reviewed by Dimitri Glazkov.
3249 We had 2 ways to show text in RenderButton. One is to use RenderButton::setText() and the other is to add renderer
3250 as a child of RenderButton. <input type="button"> used the former one, and <button> used the latter one.
3251 The former makes RenderButton a bit messy, and also prevents from making <input> AuthorShadowDOM ready.
3253 So we remove RenderButton::setText() and refactor <input type="button"> to use a Shadow DOM to show text.
3255 Since the text in <input type="button"> should create RenderTextFragment, we introduce TextForButtonInputType
3256 class. RenderText will allow us to select the inner text of <input>, but it should not.
3258 No new tests, existing tests should cover the change.
3260 * html/BaseButtonInputType.cpp:
3261 (TextForButtonInputType): Special Text node which creates RenderTextFragment.
3263 (WebCore::TextForButtonInputType::create):
3264 (WebCore::TextForButtonInputType::TextForButtonInputType):
3265 (WebCore::TextForButtonInputType::createRenderer):
3266 (WebCore::BaseButtonInputType::BaseButtonInputType):
3267 (WebCore::BaseButtonInputType::createShadowSubtree):
3268 (WebCore::BaseButtonInputType::destroyShadowSubtree):
3269 (WebCore::BaseButtonInputType::valueAttributeChanged): When a button value is changed, we reflect the value to
3270 the text node in ShadowDOM.
3271 * html/BaseButtonInputType.h:
3272 (BaseButtonInputType):
3273 * html/FileInputType.cpp:
3274 (WebCore::UploadButtonElement::create): Creates Shadow DOM subtree.
3275 (WebCore::UploadButtonElement::createForMultiple): Creates Shadow DOM subtree.
3276 * html/HTMLInputElement.cpp:
3277 (WebCore::HTMLInputElement::parseAttribute):
3278 * html/InputType.cpp:
3279 (WebCore::InputType::valueAttributeChanged):
3283 * rendering/RenderButton.cpp:
3284 (WebCore::RenderButton::RenderButton):
3285 (WebCore::RenderButton::styleDidChange): Removed unnecessary text related code.
3286 * rendering/RenderButton.h:
3289 2012-09-19 Jason Liu <jason.liu@torchmobile.com.cn>
3291 [BlackBerry] Get infinite amount of requests after attempting re-authentication basic.
3292 https://bugs.webkit.org/show_bug.cgi?id=96994
3294 Reviewed by Rob Buis.
3296 We should remove the wrong credentials before calling sendRequestWithCredentials again.
3298 Reviewed internally by Jonathan Dong.
3300 No new tests. It is covered by ManualTests/blackberry/http-auth-challenge.html.
3303 * platform/network/blackberry/NetworkJob.cpp:
3304 (WebCore::NetworkJob::notifyAuthReceived):
3306 2012-09-19 Adam Barth <abarth@webkit.org>
3308 Remove Blob.webkitSlice
3309 https://bugs.webkit.org/show_bug.cgi?id=96715
3311 Reviewed by Darin Fisher.
3313 Based on these usage metrics, it appears that it is safe to remove
3314 Blob.webkitSlice. Folks that were previously calling webkitSlice should
3315 just call slice instead. They do the same thing.
3317 Ratio of Blob.webkitSlice calls to Blob.slice: 14.87%
3318 Ratio of Blob.webkitSlice calls to Document creation: 0.0053%
3321 (WebCore::Blob::slice):
3327 * inspector/front-end/FileUtils.js:
3328 (WebInspector.ChunkedFileReader.prototype._loadChunk):
3330 2012-09-19 Julien Chaffraix <jchaffraix@webkit.org>
3332 The collapsing border code needs direction-aware border getters
3333 https://bugs.webkit.org/show_bug.cgi?id=96710
3335 Reviewed by Ojan Vafai.
3337 This refactoring is needed to extend our collapsing border support for mixed directionality
3338 at the table cell level (we currently wrongly ignore any direction below the row-group). For
3339 now, the new helpers are dumb and return exactly the old result but they will be made
3340 direction-aware in a follow-up change.
3342 Refactoring covered by existing tests.
3344 * rendering/RenderBox.h:
3345 (WebCore::RenderBox::hasSameDirectionAs):
3346 Added this helper function. For now, it's only used to compare against
3347 the table direction but we will reuse it to compare the current cell
3348 direction against the other table parts.
3350 * rendering/RenderTableCell.h:
3351 (WebCore::RenderTableCell::computeCollapsedStartBorder):
3352 (WebCore::RenderTableCell::computeCollapsedEndBorder):
3353 Transitioned those 2 functions to using the new direction-aware functions.
3355 * rendering/RenderTable.cpp:
3356 (WebCore::RenderTable::tableStartBorderAdjoiningCell):
3357 (WebCore::RenderTable::tableEndBorderAdjoiningCell):
3358 * rendering/RenderTableSection.cpp:
3359 (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
3360 (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
3361 * rendering/RenderTableCell.h:
3362 (WebCore::RenderTableCell::borderAdjoiningTableStart):
3363 (WebCore::RenderTableCell::borderAdjoiningTableEnd):
3364 * rendering/RenderTableSection.h:
3365 (WebCore::RenderTableSection::borderAdjoiningTableStart):
3366 (WebCore::RenderTableSection::borderAdjoiningTableEnd):
3367 Updated those call sites to use RenderBox::hasSameDirectionAs.
3369 * rendering/RenderTableCell.h:
3370 (WebCore::RenderTableCell::borderAdjoiningNextCell):
3371 (WebCore::RenderTableCell::borderAdjoiningPreviousCell):
3372 * rendering/RenderTableCol.cpp:
3373 (WebCore::RenderTableCol::borderAdjoiningCellStartBorder):
3374 (WebCore::RenderTableCol::borderAdjoiningCellEndBorder):
3375 (WebCore::RenderTableCol::borderAdjoiningCellBefore):
3376 (WebCore::RenderTableCol::borderAdjoiningCellAfter):
3377 * rendering/RenderTableCol.h:
3378 * rendering/RenderTableRow.cpp:
3379 (WebCore::RenderTableRow::borderAdjoiningStartCell):
3380 (WebCore::RenderTableRow::borderAdjoiningEndCell):
3381 * rendering/RenderTableRow.h:
3382 (WebCore::RenderTableRow::borderAdjoiningTableStart):
3383 (WebCore::RenderTableRow::borderAdjoiningTableEnd):
3384 * rendering/RenderTableSection.cpp:
3385 (WebCore::RenderTableSection::borderAdjoiningStartCell):
3386 (WebCore::RenderTableSection::borderAdjoiningEndCell):
3387 New direction-aware functions. Added some ASSERT to ensure
3388 we don't call them with the wrong parameters.
3390 2012-09-19 Kentaro Hara <haraken@chromium.org>
3392 [V8] ScriptController::compileAndRunScript() can crash
3393 https://bugs.webkit.org/show_bug.cgi?id=96567
3395 Reviewed by Adam Barth.
3397 See chromium bug: http://code.google.com/p/chromium/issues/detail?id=146776
3399 The root cause is that v8::PreCompile() can return 0 when the stack of
3400 V8's parser overflows (c.f. http://code.google.com/codesearch#OAMlx_jo-ck/src/v8/src/parser.cc&exact_package=chromium&q=kPreParseStackOverflow&type=cs&l=6021).
3402 This patch adds the 0 check to the caller side. Given that precompileScript()
3403 is just trying to speculatively precompile a script, it's OK to give up
3404 precompiling for such edge cases.
3406 Manually tested with the html generated by the following shell script:
3408 echo '<script language="JavaScript" type="text/javascript" src="asan-crash.js"></script>' > asan-crash.html
3409 echo 'if(wURLF.search("")>=0) {}' > asan-crash.js
3410 for i in `seq 14830`
3412 echo 'else if(wURLF.search("")>=0) {}' >> asan-crash.js
3415 I didn't add the test because '14380' depends on an environment
3416 and because we don't want to add a huge html test.
3418 * bindings/v8/ScriptSourceCode.cpp:
3419 (WebCore::ScriptSourceCode::precompileScript):
3421 2012-09-19 Joshua Bell <jsbell@chromium.org>
3423 IndexedDB: Pending call cleanup
3424 https://bugs.webkit.org/show_bug.cgi?id=96952
3426 Reviewed by Tony Chang.