Bug 111932

Summary: Add a heuristic to determine the “primary” snapshotted plugin
Product: WebKit Reporter: Tim Horton <thorton>
Component: Plug-insAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, esprehn+autocc, jonlee, ojan.autocc, sam, simon.fraser, webkit-ews, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 145252    
Bug Blocks:    
Attachments:
Description Flags
patch
none
patch
webkit-ews: commit-queue-
patch
none
patch dino: review+

Tim Horton
Reported 2013-03-09 17:34:45 PST
So it could be styled differently, etc. via a UA stylesheet. <rdar://problem/13270208>
Attachments
patch (13.14 KB, patch)
2013-03-09 18:09 PST, Tim Horton
no flags
patch (13.14 KB, patch)
2013-03-09 18:12 PST, Tim Horton
webkit-ews: commit-queue-
patch (12.88 KB, patch)
2013-03-09 18:21 PST, Tim Horton
no flags
patch (17.47 KB, patch)
2013-03-09 19:37 PST, Tim Horton
dino: review+
Tim Horton
Comment 1 2013-03-09 17:39:09 PST
Putting it in WK2 because that’ll keep it out of the way for most people... while a heuristic like this doesn’t really belong in WebKit at all - it’s going to require a good bit of effort to make it possible to put it in the client. We plan to eventually expose enough knowledge to do that, but not yet.
Tim Horton
Comment 2 2013-03-09 18:09:51 PST
Tim Horton
Comment 3 2013-03-09 18:12:35 PST
Early Warning System Bot
Comment 4 2013-03-09 18:18:34 PST
EFL EWS Bot
Comment 5 2013-03-09 18:19:12 PST
Tim Horton
Comment 6 2013-03-09 18:21:54 PST
Sam Weinig
Comment 7 2013-03-09 19:13:40 PST
Can we use a different #define that PLATFORM(MAC) for this, at the very least to be more descriptive.
Tim Horton
Comment 8 2013-03-09 19:14:52 PST
(In reply to comment #7) > Can we use a different #define that PLATFORM(MAC) for this, at the very least to be more descriptive. Yeah, I was considering that. Currently trying to consolidate all of the #ifs in one file so that that becomes less touch-Platform.h and more add-something-to-the-top-of-WebPage.
Tim Horton
Comment 9 2013-03-09 19:25:36 PST
(In reply to comment #8) > (In reply to comment #7) > > Can we use a different #define that PLATFORM(MAC) for this, at the very least to be more descriptive. > > Yeah, I was considering that. Currently trying to consolidate all of the #ifs in one file so that that becomes less touch-Platform.h and more add-something-to-the-top-of-WebPage. I’m having a hard time telling if that’s a legitimate thing to do. People seem to be using WTF_USE_ for that, which I think is wrong, it should be WTF_ENABLE_, and it’s not done very often. I’ll move it to Platform.h/wherever if someone complains.
Tim Horton
Comment 10 2013-03-09 19:37:07 PST
Dean Jackson
Comment 11 2013-03-10 13:36:32 PDT
Comment on attachment 192367 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=192367&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:3953 > + LayoutUnit contentArea = renderBox->contentWidth() * renderBox->contentHeight(); > + > + if (renderBox->contentWidth() < primarySnapshottedPlugInMinimumWidth || renderBox->contentHeight() < primarySnapshottedPlugInMinimumHeight) > + continue; You can swap these two statements.
Tim Horton
Comment 12 2013-03-10 13:52:56 PDT
Note You need to log in before you can comment on or make changes to this bug.